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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,effb80d4bb7716dd X-Google-Attributes: gid103376,public From: Richard D Riehle Subject: Re: Wanted: Ada STL. Reward: Ada's Future Date: 1999/02/02 Message-ID: <79817u$kqr@dfw-ixnews11.ix.netcom.com>#1/1 X-Deja-AN: 439952682 References: <790f4q$3l@bgtnsc01.worldnet.att.net> Organization: Netcom X-NETCOM-Date: Tue Feb 02 5:20:30 PM CST 1999 Newsgroups: comp.lang.ada Date: 1999-02-02T17:20:30-06:00 List-Id: In article , Ehud Lamm wrote: >It seems that one problem in implementing STL in Ada95 is the lack of >pointer arithmetic. This causes perofremance problems in real sense (to >be exact the result is worse from a complexity point of view). This is a >"nice" result in that it tells you something about the price you pay for >pointer abstraction etc. However it is sad from a practical point of view. >I haven't really pursued this, so I can't vouch that there isn't some >trick to solve this problem. Pointer arithmetic is not directly supported by Ada 95, true. Also true, the absence of direct support encourages the designer to use the better abstractions provided by the default. On the other hand, one can do pointer arithmetic in Ada via the package System children, albeit with some difficulty. It is first necessary to instantiate the generic package System.Address_To_Access_Conversions. Then, using another package, System.Storage_Elements one can do arithmetic on the address produced from the function, System.Address_To_Access_Conversions.To_Address. None of this is for the "faint of heart." Certainly, it is not for anyone who is just tooling around with addresses. However, these packages seem suited for most situations where such arithmetic is necessary. But don't do this on the software that flies the airplane on which I am flying. Richard Riehle richard@adaworks.com http://www.adaworks.com