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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7eaf9f2597de2259 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-12 02:26:56 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: "M. A. Alves" Newsgroups: comp.lang.ada Subject: Re: on package naming, should the word "_pkg" be part of it? Date: Fri, 12 Oct 2001 11:35:06 +0000 (GMT) Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: avanie.enst.fr 1002878814 21342 137.194.161.2 (12 Oct 2001 09:26:54 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Fri, 12 Oct 2001 09:26:54 +0000 (UTC) To: Return-Path: X-X-Sender: In-Reply-To: <3bc6aaef.2565789@news.demon.co.uk> Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.4 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:14373 Date: 2001-10-12T11:35:06+00:00 > > > The Object.Method syntax can be implemented with preprocessing > > > (please correct me if I am wrong on this). > > Wouldn't you lose some of the dispatching capabilities of Ada then? No. > All you'd do (using a rough example of my suggestion earlier) would be > to convert: > > class XXX is > procedure DoSomething; > procedure AClassOperation is classwide; > end XXX; > > class YYY extends XXX is > procedure DoSomething; > Item_1 : Integer; > ClassItem : Integer is classwide; -- Use classwide, not static!!! > end YYY; > > into: > > package XXXs is > type XXX is abstract tagged null record; > procedure DoSomething (This : in XXX); > procedure AClassOperation; > end XXXs; > > package YYYs is > type YYY is new XXX with > record > Item_1 : Integer; > end record; > ClassItem : Integer; > end YYYs; Yes, looks like a sound equivalence model. For preprocessing only though; dont agree to put this in the language. Cheers, -- , M A R I O data miner, LIACC, room 221 tel 351+226078830, ext 121 A M A D O Rua Campo Alegre, 823 fax 351+226003654 A L V E S P-4150 PORTO, Portugal mob 351+939354002