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,4ee5611d3fbf05b7 X-Google-Attributes: gid103376,public From: Peter Amey Subject: Re: Enumeration literal visibility and use type Date: 1998/05/27 Message-ID: <356C45DE.5BF3@praxis-cs.co.uk>#1/1 X-Deja-AN: 356936264 Content-Transfer-Encoding: 7bit References: <6kej65$dnh$1@hermes.seas.smu.edu| <6kejt5$75u@gcsin3.geccs.gecm.com> <6kensr$fqq$1@hermes.seas.smu.edu> <6kf0r3$isj$1@mulga.cs.mu.OZ.AU> <6kgh82$92n@gcsin3.geccs.gecm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Praxis Critical Systems Newsgroups: comp.lang.ada Date: 1998-05-27T00:00:00+00:00 List-Id: John McCabe wrote: > > fjh@cs.mu.oz.au (Fergus Henderson) wrote: > >>So once again, I am merely asking for a reference to some documentation > >>that might describe _why_ OPERATORS only were made visible > > > >Because explicit module qualifiers on OPERATORS look very ugly. > > And explicit module qualifiers on enumeration literals don't? > Not if suitable names are chosen. Most of the difficulties with Ada prefixes and dotted names seem to arise because people fight the language rather than taking advantage of it. Names should be chosen for their readability in context. I much prefer: package Valve is type T is (Open, Shut); end Valve; allowing: DrainValve : Valve.T := Valve.Shut; to the more common(in my experience) form: package BasicTypes is type ValveType is (Open, Shut); end BasicTypes; which leads to: DrainValve : BasicTypes.ValveType := BasicTypes.Shut; which _is_ ugly. Peter -- --------------------------------------------------------------------------- __ Peter Amey, Product Manager ) Praxis Critical Systems Ltd / 20, Manvers Street, Bath, BA1 1PX / 0 Tel: +44 (0)1225 466991 (_/ Fax: +44 (0)1225 469006 http://www.praxis-cs.co.uk/ --------------------------------------------------------------------------