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.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,80e076d5ce42fefa X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,9e2776c05028676e X-Google-Attributes: gid103376,public From: Nick Leaton Subject: Re: Why Ada is not the Commercial Lang of Choice Date: 1997/06/20 Message-ID: <33AA830B.46EE@calfp.co.uk>#1/1 X-Deja-AN: 251330710 X-NNTP-Posting-Host: calfp.demon.co.uk [158.152.70.168] References: <5o9eca$aoi$1@goanna.cs.rmit.edu.au> <1997Jun20.070747.1@eisner> Newsgroups: comp.lang.ada,comp.lang.eiffel Date: 1997-06-20T00:00:00+00:00 List-Id: Larry Kilgallen wrote: > > In article , donh@syd.csa.com.au (Don Harrison) writes: > > > However, they differ in that digits must be grouped in threes. Grouping in > > threes is an arbitrary choice and, IMO, too restrictive. For example, it makes > > no sense for base 2 literals. OTOH, I think Ada's free placement is too liberal > > because it allows different groupings within the same literal. > > > > Something in between is probably optimal - like allowing any grouping but with > > the restriction that it must be consistent within a literal. > > I can envision an application using part numbers, where the first > two digits indicate the plant that built the part and the last > two represent the revision number. In that case, 21_302_561_03 > might be a much more natural representation than 2_130_256_103. > In fact, absent some other well-known (to humans) aspect of the > part numbering scheme, it would also provide a better scanning > profile than 21_30_25_61_03. > I agree with the original idea, that splitting numbers in threes doesn't make sense if you are dealing with a binary number. Also, if you were Japanese, then splitting in 4 makes more sense. However, your part number example is not a good one. You should be splitting it into two. You have two attributes, plant number and revision number. You then have a separate problem of how to display the information, which is turning the two pieces of information into a string, which is displayable. How you store the information is then a separate problem, where you may do something like storing an integer value, of plant_number * 100 + revision_number. -- Nick