comp.lang.ada
 help / color / mirror / Atom feed
From: smize@news.imagin.net (Samuel Mize)
Subject: Re: Trailing Underscores (was Re: Problems translating C to Ada)
Date: 1998/09/03
Date: 1998-09-03T00:00:00+00:00	[thread overview]
Message-ID: <6smbkq$1vci$1@prime.imagin.net> (raw)
In-Reply-To: EACHUS.98Sep1185958@spectre.mitre.org

In article <EACHUS.98Sep1185958@spectre.mitre.org>,
Robert I. Eachus <eachus@spectre.mitre.org> wrote:
>In article <35EC2FA8.3308@cae.ca> Viqar Abbasi <viqar@cae.ca> 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




  reply	other threads:[~1998-09-03  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-01  0:00 Problems translating C to Ada Viqar Abbasi
1998-09-01  0:00 ` Trailing Underscores (was Re: Problems translating C to Ada) Robert I. Eachus
1998-09-03  0:00   ` Samuel Mize [this message]
     [not found] ` <35ED511D.2C4A2038@boeing.com>
1998-09-02  0:00   ` Problems translating C to Ada Ronald Ali
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox