From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b0d569080889afd6 X-Google-Attributes: gid103376,public From: Florian Weimer Subject: Re: A question for my personal knowledge. Date: 1999/05/15 Message-ID: #1/1 X-Deja-AN: 478107382 References: <1VEZ2.1515$I51.88140@carnaval.risq.qc.ca> <37372A84.641F2133@bigfoot.com> <7h8oe8$2js$1@cf01.edf.fr> <37382B0C.A95B6745@bigfoot.com> <7h9o21$9v4$1@nnrp1.deja.com> <7h9pei$aut$1@nnrp1.deja.com> <373AC668.4824FF07@decada.enet.dec.com> <7hfctj$1kb4@drn.newsguy.com> <7hfp1n$28tr@drn.newsguy.com> <7hhuqp$2jd9@drn.newsguy.com> Mail-Copies-To: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@cygnus.stuttgart.netsurf.de X-Trace: deneb.cygnus.stuttgart.netsurf.de 926750544 6002 192.168.0.1 (15 May 1999 06:42:24 GMT) Organization: Penguin on board User-Agent: Gnus/5.070083 (Pterodactyl Gnus v0.83) XEmacs/20.4 (Emerald) Mime-Version: 1.0 NNTP-Posting-Date: 15 May 1999 06:42:24 GMT Newsgroups: comp.lang.ada Date: 1999-05-15T06:42:24+00:00 List-Id: Steve writes: > In article , Florian says... > >Mike writes: > > > >> in real OO, you invoke methods on objects. > > > > >No, you send messages to them. > > Yes, that is even better. Now In Ada, how does one send a message to a > tagged record?? `Message(Tagged_Record_Variable);'? I'm not sure whether Ada is a bit nearer to the message-based model than C++ or Java because I haven't understood all the implications of the Ada approach yet. C++ and Java lack truely dynamic message dispatching (i.e. you can only send a message to an object if its class (or some suitable base class) is known at compile-time), and judging from my preliminary understanding, Ada doesn't have this capability, either. Of course, you can implement dynamic dispatching in almost any (even non-OO) languages used today, but without syntactic support of some kind, your code won't be easy to write or read. BTW: At bytecode level, the Java object model is very similar to that of Smalltalk and Objective C. Although you can access some of these aspects via the Reflections API, this is very clumsy, completely lacking any syntactic sugar, and certainly not intended for regular use. > >(SCNR. I was offered a job as a Smalltalk coder yesterday. ;) > > cool. Smalltalk is a real OO language, even more than Java. But Java > is the one most used OO language these days. Unfortunately, I couldn't accept, because I'm already under contract -- as a C++ programmer. :-/ But some day, I certainly want to do some real work with one of these more dynamic OO languages (Smalltalk, Objective C or even Python). (Of course, Ada is on my list, too. But I wonder whether I'll get there because I don't want to become a full-time programmer at all. ;)