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: 103376,4cbda4cb881c06d X-Google-Attributes: gid103376,public From: smize@news.imagin.net (Samuel Mize) Subject: Re: Trailing Underscores (was Re: Problems translating C to Ada) Date: 1998/09/03 Message-ID: <6smbkq$1vci$1@prime.imagin.net>#1/1 X-Deja-AN: 387508707 References: <35EC2FA8.3308@cae.ca> Organization: ImagiNet Communications Ltd, Arlington, Texas Reply-To: smize@imagin.net (Samuel Mize) Newsgroups: comp.lang.ada Date: 1998-09-03T00:00:00+00:00 List-Id: In article , Robert I. Eachus wrote: >In article <35EC2FA8.3308@cae.ca> Viqar Abbasi writes: > > > Recently gained Ada experience: > > Ada9X RM and GNAT 3.09 do not allow underscores at the > > end of a procedure / function / variable name. Why not? > > Because Ada 83 did not. > > Seriously, there were several proposals for extensions to the >variable name syntax discussed at the Salem, Massachusetts meeting. I wasn't there, but the decision reached makes sense to me. We want identifiers to be readable and easily distinguished as words or phrases. We have mixed case for readability: we can write Dogma or DOGMA, whatever we find best (if it's an acronym perhaps DOGMA is better). We have case-insensitive names so we don't have to distinguish Dogma from dogma or DogMa. We have the underscore for readability, so we can separate words with more than capitalization. (I know some people prefer CapSeparatedWords, but that's what the underline is intended for.) The point is, we're trying to make identifiers look like words or phrases. Specifically, we want different identifiers to look like DIFFERENT phrases. But Dogma_ and Dogma are the same word. There's no human-language-level distinction. The main reason I've seen for using trailing underscores is to make it easier to link with languages that add underscores at the ends of their identifiers. But this is better handled with pragmas like Import. Do you have another reason for wanting trailing underscores? Best, Sam Mize -- Samuel Mize -- smize@imagin.net (home email) -- Team Ada Fight Spam: see http://www.cauce.org/ \\\ Smert Spamonam