Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!p.cs.uiuc.edu!johnson From: johnson@p.cs.uiuc.edu Newsgroups: comp.object Subject: Re: "Messaging" (Re: Reentrant code) Message-ID: <135300010@p.cs.uiuc.edu> Date: 17 Oct 89 16:40:36 GMT References: <8636@goofy.megatest.UUCP> Lines: 29 Nf-ID: #R:goofy.megatest.UUCP:8636:p.cs.uiuc.edu:135300010:000:1277 Nf-From: p.cs.uiuc.edu!johnson Oct 16 17:51:00 1989 I said >> There is no essential difference between Smalltalk messages and C++ >> virtual functions. psrc@pegasus.ATT.COM said >Well, not really. and mentioned perform:. I've used Smalltalk heavily for the last four years, and C++ off and on for the last three years. I still say that there is no practical difference between messages and virtual functions. One exotic application for perform: is in a distributed Smalltalk that we built, where a message to a proxy object on one machine would cause a string to be sent to another machine. The string was parsed and turned into a symbol, which was used to "perform:" the operation on the remote object. However, RPC systems do something similar using numbers instead of symbols, so there is no real loss of power. The big advantage of Smalltalk untyped messaging is that it is much better suited to experimental programming. Virtual functions are closely tied to C++'s type system, which forces the programmer to decide interfaces early. When the interfaces turn out to be wrong, as usually happens, the programmer has to make lots of revisions. However, from a high-level design point of view, I don't think that there is much difference between them. Ralph Johnson -- University of Illinois at Urbana-Champaign