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,T_FILL_THIS_FORM_SHORT autolearn=no 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-29 02:14:57 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!dialin-145-254-039-049.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: The old "Object.Method" syntax debate Date: Thu, 29 May 2003 11:17:20 +0200 Organization: At home Message-ID: References: <254c16a.0305210726.485125de@posting.google.com> <3eccdf77$1@epflnews.epfl.ch> <3ecdd296$1@epflnews.epfl.ch> <3ED056CB.8000200@attbi.com> <3ed33506.7272397@news.btclick.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-039-049.arcor-ip.net (145.254.39.49) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1054199695 5897211 145.254.39.49 (16 [77047]) User-Agent: KNode/0.7.1 Xref: archiver1.google.com comp.lang.ada:37977 Date: 2003-05-29T11:17:20+02:00 List-Id: Lutz Donnerhacke wrote: > * Dmitry A. Kazakov wrote: >> However, overriding attributes raises an interestring question of making >> everything that could appear on the left side of an attribute a >> first-class object. > > Furthermore it allows an envolving solution to the original question: > > Drop the restriction which attributes are allowed. Several attributes > might have a predefined meaning, but other than the predefined attributes > might be allowed in Ada200x. > > So if you want to apply an 'object.method' syntax, do > > type object ...; > procedure method(a : in out object; ...); > for object'method use method; Or better object'method renames method; Now if you do not want to expose method, you would need a sort of private renaming: object'method renames private; private procedure method(a : in out object; ...); object'method renames method; > But there are more important features missing an Ada 95: > ************************************************************************ > Newsgroups: comp.lang.ada > Subject: AdaYY wish list from current projects > Organization: IKS GmbH Jena > Message-ID: <96ulad$r9e$1@belenus.iks-jena.de> > > I have three sad problems (and a bonus problem) from my current projects. > If they can fixed by a compiler it would be very fine: > > Problem 1: Pointer of component => Pointer to aggregate Solved with MI = Class-wide pointer -> Dispatch > Problem 2: Defining Byte_Order of record representations I didn'tunderstand this. Why Value := Low + High * 256 is unsufficient. I never had problems in passing integers over sockets. But I admit, I know no solution for an efficient dealing with floats (in binary format). > Problem 3: Static expressions of discriminants in record representations Yes it is a pain. But the major problem as I see it is breaking separation of implementation and interface by discriminants. Clearly there has to be public and private (implementational) discriminants. Later deduced from former. With true constructors this could be solved. > Problem 4: Single task packages My problem is that task and protected types are not tagged and so fall out of type hierarchy. Then I would like to have "accept"-procedures (with task object as a parameter) in addition to the accept statement. -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de