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,b6e97963d32ee242 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-27 02:18:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.icl.net!newsfeed.fjserv.net!peer2.news.opaltelecom.net!zen.net.uk!btnet-peer1!btnet-feed3!btnet-peer0!btnet-feed5!btnet!news.btopenworld.com!not-for-mail From: john@nospam.demon.co.uk (John McCabe) Newsgroups: comp.lang.ada Subject: Re: The old "Object.Method" syntax debate Date: Tue, 27 May 2003 09:17:08 +0000 (UTC) Organization: BT Openworld Message-ID: <3ed32be0.4929988@news.btclick.com> References: NNTP-Posting-Host: host217-37-177-69.in-addr.btopenworld.com X-Trace: hercules.btinternet.com 1054027028 919 217.37.177.69 (27 May 2003 09:17:08 GMT) X-Complaints-To: news-complaints@lists.btinternet.com NNTP-Posting-Date: Tue, 27 May 2003 09:17:08 +0000 (UTC) X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.lang.ada:37826 Date: 2003-05-27T09:17:08+00:00 List-Id: On Fri, 23 May 2003 19:59:32 +0200, Lionel.DRAGHI@fr.thalesgroup.com wrote: >| -----Message d'origine----- >| De: john@nospam.demon.co.uk [mailto:john@nospam.demon.co.uk] >... >| You could have something like: >| >| tagged package X is >| a : integer; >| b : float; >| >| procedure method; >| end X; >| >| So 'a' and 'b' would be object attributes and 'method' would be an >| object method. This sort of package would essentially define a single >| tagged type without all of the record definition and controlling >| parameters etc. >| >| Further you could use: >| >| tagged package Y is new X with >| c : some_enumerated_type; >| end Y; >| etc.. >| >I find this pretty elegant, Thank you. > although using the "package" keyword leads to > the class/module confusion that Ada currently avoid. That is a fair point, but it would be interesting to know how much of the Ada code written in under the 'object-oriented' paradigm actually uses a single tagged type per package. Over a period of around 3 years I worked in 2 separate companies where this was pretty much the case. In fact, in both cases the code structure was automatically generated. >And removing "package" brings us not so far from Steve proposal, isn't it? True. It's not very different except for the limitation of one 'class' per package. Best Regards John McCabe To reply by email replace 'nospam' with 'assen'