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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: donh@syd.csa.com.au (Don Harrison) Subject: Re: Why Ada is not the Commercial Lang of Choice Date: 1997/06/23 Message-ID: #1/1 X-Deja-AN: 251961020 Sender: news@syd.csa.com.au X-Nntp-Posting-Host: dev50 References: <1997Jun20.070747.1@eisner> Organization: CSC Australia, Sydney Reply-To: donh@syd.csa.com.au Newsgroups: comp.lang.ada,comp.lang.eiffel Date: 1997-06-23T00:00:00+00:00 List-Id: I wrote: :> 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. Two situations have been suggested where free placement would be desirable: a) Use of numbers for identity, and b) Binary representations with different boundaries. Larry Kilgallen wrote: :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. Maybe a better way of indicating identity would be to use a class PART_NUMBER containing the various sub-components and use strings for I/O. If you use integers, you get unwanted arithmetic operations that are inappropriate for part numbers. Donovan Baarda wrote: :Nahh, why limit things? Arbitary placement of underscores is handy when :you want to define an integer literal bit-field where bits are clustered :on arbitary boundarys. True. Roy Grimm wrote: :I like having the freedom to place underscores where I need them. In :some of the work I do, I have to break up and assemble 32 bit words :composed of varying segments. I like having the ability to use a mask :that looks like this: : :2#0_00_00000_1111111111111111_00000000# : :On the other hand, the same incoming bus data can be masked as so: : :2#0_00_1111111_1111111_1111111_00000000# : :In this case, having the flexibility is really nice. I guess it really :has to do with the context of the job you're doing. Agree. I suspect the only situations where you would need the flexibility is for binary representations. Otherwise, regular placement should suffice. Don. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Don Harrison donh@syd.csa.com.au