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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1a52c822fc0dbb23 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!news.teledata-fn.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Rational for not making cursor tagged in Containers Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1176998738.656903.141250@q75g2000hsh.googlegroups.com> <1177010938.200523.325290@p77g2000hsh.googlegroups.com> <1a8y2vakorfhx.225uqh4hifpd$.dlg@40tude.net> Date: Fri, 20 Apr 2007 09:54:18 +0200 Message-ID: <1xmzi7newnilp.23m3zze8h9yi.dlg@40tude.net> NNTP-Posting-Date: 20 Apr 2007 09:54:18 CEST NNTP-Posting-Host: 2ea3252a.newsspool1.arcor-online.net X-Trace: DXC=:eRF[:NO7BS1`E>oC;JXEZic==]BZ:af^4Fo<]lROoRQFl8W>\BH3YRWG30a1gD7kgR4f6g`Zh79[] X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:15140 Date: 2007-04-20T09:54:18+02:00 List-Id: On Thu, 19 Apr 2007 23:59:13 GMT, Ray Blaak wrote: > "Dmitry A. Kazakov" writes: >> I think prefix notation is rubbish. There should be an abstract member >> interface allowing users creation of whatever "members" they wished. So if >> anybody liked prefix notation, he could say: Mumble implements ".Mumble." >> Done. Why should the language do this by default? > > Because record types have prefix notation for fields, protected objects have > them for subprograms and entries, tasks have them for entries. Record type is just an implementation of some ADT. There is no any semantic difference between records, arrays, integers etc in that respect. That a given private implementation occasionally has any fields is an implementation detail. In a better language any type could be able implement record interface: type Foo is interface record -- This not an implementation! Mumble : Integer; end record; private type Foo is new Float; -- Implements the record interface function "Mumble" (X : Foo) return Integer; -- Getter procedure "Mumble" (X : in out Foo; Value : Integer); -- Setter > So the real question is, why *not* have them for tagged object methods. > > The typical OO languages encourage the obj.method notation, and this is useful > when one thinks of an object as owning its behaviour, rather than the > package/namespace it was declared. X := Y; -- Who owns assignment? 1 or X? And, what makes you think that OO defines methods (primitive operations) as the behavior? (We can continue this in comp.object if you want.) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de