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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3a9b49a9162025eb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-06 19:44:21 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!140.99.99.194.MISMATCH!newsfeed1.easynews.com!easynews.com!easynews!newsfeed1.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mail From: Richard Riehle Newsgroups: comp.lang.ada Subject: Re: Bye-bye Ada ? (Ada95 Wholesale Changes?) Date: Thu, 06 Feb 2003 19:53:56 -0800 Organization: AdaWorks Software Engineering Message-ID: <3E432DD4.7F256C85@adaworks.com> References: <3E3B7BB5.A1A070@adaworks.com> <3NY_9.9226$x63.6255@nwrddc01.gnilink.net> <3E40A07A.CD174746@adaworks.com> <1044457651.769640@master.nyc.kbcfp.com> <3E42A61C.20905@cogeco.ca> Reply-To: richard@adaworks.com NNTP-Posting-Host: 41.b2.48.5a Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 7 Feb 2003 03:44:20 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:33859 Date: 2003-02-07T03:44:20+00:00 List-Id: "Warren W. Gay VE3WWG" wrote: > If I look at a spec of a package I want to "clean up", and > I don't like the way the data type is presented, and want > to make some sort of wholesale change to the package, I'll > first make the necessary tweaks or major changes to the > specs. This may include: > > - Changing constants to enumerated types / vice versa One of the things I find useful is to make constants into function declarations. As a trivial example, package Constants is function Ten return Integer; pragma Inline(Ten); function Avogradro return Float; pragma Inline(Avogadro); end Constants; something I cannot do in C++ because of the need to have a full implementation to create an inlined function. This allows me to compile the body separately, have whatever implementation I wish, and modify the implementation if the need arises without changing the specification. > > - Changing a weak type to a strong type > - Making types more range specified (subtypes) Not sure you meant that as shown. Subtypes actually relax the type model a little. Also, I have seen problems with declaring too many different real number types in some programs. Richard Riehle