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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c9a5d6b3975624e1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-04 19:14:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn11feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc03.POSTED!not-for-mail From: "SteveD" Newsgroups: comp.lang.ada References: Subject: Re: OO in Ada X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: NNTP-Posting-Host: 12.225.227.101 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc03 1033784041 12.225.227.101 (Sat, 05 Oct 2002 02:14:01 GMT) NNTP-Posting-Date: Sat, 05 Oct 2002 02:14:01 GMT Organization: AT&T Broadband Date: Sat, 05 Oct 2002 02:14:01 GMT Xref: archiver1.google.com comp.lang.ada:29528 Date: 2002-10-05T02:14:01+00:00 List-Id: "Rick Duley" wrote in message news:mailman.1033697703.29112.comp.lang.ada@ada.eu.org... [snip] > 5. One final thing (for this time anyway ;), why is it that that Ada does > not use the intuitive 'object.method' syntax for making calls to and object. > This would mean that (in the case described in section 3) the call would > read > > Pen.Draw(To_X => n, To_Y => n); > > and with inheritance this would be accessible through the child package > declaring Thick_Pen. While I'm okay with using the existing syntax, I feel > the 'object.method' syntax is more intuitive and in line with OO thinking. Although I hear the claim that object.method is more intuitive, I would have to say I disagree. In my opinion the only reason you see it as more intuitive is because you learned it that way first (in a different programming language). In C++ there is a hidden "this" pointer quietly hiding in the background that you must be very much aware of (if you're doing any serious programming). In Ada this is an explicit variable passed into the procedure. I would guess that a newbie would find the Ada syntax more intuitive (I haven't heard of any evidence either way). SteveD