Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pacbell!att!dptg!pegasus!psrc From: psrc@pegasus.ATT.COM (Paul S. R. Chisholm) Newsgroups: comp.object Subject: Re: "Messaging" (Re: Reentrant code) Summary: Smalltalk messages vs. C++ virtual messages Message-ID: <4171@pegasus.ATT.COM> Date: 16 Oct 89 00:35:06 GMT References: <8636@goofy.megatest.UUCP> <135300001@p.cs.uiuc.edu> Organization: AT&T Bell Laboratories Lines: 25 In article <135300001@p.cs.uiuc.edu>, johnson@p.cs.uiuc.edu writes: > There is no essential difference between Smalltalk messages and C++ > virtual functions. Well, not really. If you know (at run time) the name of a Smalltalk message (at compile time), you can arrange to send that message to an object. For example, I can say: obj perform: ( 'new' asSymbol ) More to the point, instead of using a String constant, I could have prompted the user for the name of a message to send. If the message doesn't exist, or takes the wrong number of arguments, you'll get a walkback and/or a debugger. That information is completely lost by run time in C++ programs. (On the other hand, C++ programs don't usually run in an environment where they can ask the user for help.) This is neither a general strength nor limitation of either language. The abilities reflect the intended use of the languages. > Ralph Johnson Paul S. R. Chisholm, AT&T Bell Laboratories att!pegasus!psrc, psrc@pegasus.att.com, AT&T Mail !psrchisholm I'm not speaking for the company, I'm just speaking my mind.