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,4c459ff0adb576bc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-15 11:09:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!news.demon.co.uk!demon!pogner.demon.co.uk!zap!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Refactoring and Ada Date: 12 Feb 2002 19:16:37 +0000 Organization: Pushface Message-ID: References: <3C5AB0B7.9D75D49A@grammatech.com> <3c639940@pull.gecm.com> <4519e058.0202080714.1bf916bb@posting.google.com> <3C65BFF4.F15A07D0@earthlink.net> NNTP-Posting-Host: localhost X-NNTP-Posting-Host: pogner.demon.co.uk:158.152.70.98 X-Trace: news.demon.co.uk 1013800124 nnrp-14:28666 NO-IDENT pogner.demon.co.uk:158.152.70.98 X-Complaints-To: abuse@demon.net NNTP-Posting-Date: 12 Feb 2002 19:16:37 GMT X-Newsreader: Gnus v5.7/Emacs 20.7 Xref: archiver1.google.com comp.lang.ada:20057 Date: 2002-02-12T19:16:37+00:00 List-Id: "Marin David Condic" writes: > I'd agree that all too often folks would slap a rep clause on > something where the internal representation didn't matter. But often > it was done for something reasonably approximating a good reason: > > "I'm not sure how this type may be used as the system grows. Perhaps > we'll be putting it into external messages or files and it will be > important to insure that we know/control the representation..." I would derive a new type for external use and put the representation clauses on that: package Rep is type Int is (A, B); for Int use (A => 0, B => 1); -- confirming, of course type Ext is new Int; for Ext use (A => 16#aa#, B => 16#bb#); end Rep;