From: Adam Beneschan on
On Feb 12, 7:15 am, Robert A Duff <bobd...(a)shell01.TheWorld.com>
wrote:

> No, it should be syntactic.  And it should be more obvious
> than counting the number of expressions between "(" and ")".
>
> Aggregates should use "[" and "]", so there's no confusion.
> An empty aggregate would be "[ ]", and a singleton
> would be "[X]".  As far as I know, the only reason
> this wasn't done was because of keyboards/character sets
> that didn't have those characters.  But that's a bogus
> reason -- it could be done just like the stuff in J.2.

I thought it was because of keypunch machines! Yes, there were still
a few of those around when Ada was first designed.

I also remember some of the attempted rationalizations at the time; in
particular, why did Ada use parentheses for both subprogram calls and
array indexing, when other popular languages (Pascal and C) used
square brackets for indexing. Someone came up with an argument that
it was actually a good thing to use the same characters for both,
because then if your program uses Arr(Index), where Arr is an array,
you could redesign your program to make "Arr" a function and the
change would be transparent. That seemed like a stretch at the time.

Now that the language requires compilers to allow identifiers
containing any character in any alphabet that exists or has ever
existed, including ancient languages like Ogham (http://
en.wikipedia.org/wiki/Ogham --- seriously, I'm dying to use an
Eamhancholl in one of my variable names), there doesn't seem to be
much justification for avoiding square and curly brackets, besides
inertia. No, you don't want use so many special characters that your
program starts to look like Egyptial hieroglyphics---or worse, a C++
program---but I do think that allowing the sort of syntax you suggest
for aggregates would be a plus.

-- Adam

From: Adam Beneschan on
On Feb 11, 8:47 pm, Hibou57 (Yannick Duchêne)
<yannick_duch...(a)yahoo.fr> wrote:
> On 11 fév, 18:40, Adam Beneschan <a...(a)irvine.com> wrote:> Yes, I believe that's right, and it's spelled out clearly in the RM,
> > in sections 7.6(17.1/3-17.11/3 and especially 17.7/3), 6.5(5.8/3),
> > 6.5(23/2), 7.6(4), and 3.10.2(10.1/2).
>
> With the exception of 6.5(23/2), none of these references exists in my
> annotated RM. Was this a joke ?

No. And it looks like you found 3.10.2(10.1/2) since you mentioned it
in a later post. Some of the others are in Ada 2005 R2 (the part
about result objects "mutating into" other objects was added after the
original version of Ada 2005). If you're having problems locating
sections, let me know---it's possible I made a typo.

The "spelled out clearly" was a joke, though. In particular, my
repeated attempts to understand the accessibility rules in 3.10.2 have
contributed to the big profits enjoyed by the manufacturers of Advil
and similar drugs. (OK, it's a very tiny contribution, but still
greater than zero.)

-- Adam




From: Adam Beneschan on
On Feb 12, 9:53 am, Jacob Sparre Andersen <spa...(a)nbi.dk> wrote:
> Jean-Pierre Rosen ha scritto:
>
> > It shows your age when you think you started programming on a
> > TTY-33...
>
> I may be a bit younger.  I think I started programming on a VT-220...

Yeah, one of them durn newfangled cathode ray tube things. You
youngsters have no idea how good you have it. I had to walk five
miles to the computing center, uphill both ways, with one of them big
old keypunch machines strapped to my back.

-- Adam
From: mockturtle on
On Feb 12, 5:57 pm, Adam Beneschan <a...(a)irvine.com> wrote:
>
> Now that the language requires compilers to allow identifiers
> containing any character in any alphabet that exists or has ever
> existed, including ancient languages like Ogham (http://
> en.wikipedia.org/wiki/Ogham --- seriously, I'm dying to use an
> Eamhancholl in one of my variable names),

To increase readibility, right? :-)) (sorry, I could not resist)

From: Robert A Duff on
"(Hibou57) Yannick Duch�ne" <yannick_duchene(a)yahoo.fr> writes:

> Le Fri, 12 Feb 2010 16:10:19 +0100, Robert A Duff
> <bobduff(a)shell01.theworld.com> a �crit:
>>>> Extended return statements are not so important for nonlimited types,
>>>> but they do come in handy in that case, too.
>>> While this may be useful, if it was, to have a way to return none-
>>> limited as built-in-place, for efficiency purpose (just suggesting
>>> this be to investigated, I do not assert this could surely be done
>>> like this and as-is).
>>
>> Again, extended returns do NOT cause build-in-place.
>> For non-limited, the compiler may choose build-in-place
>> for efficiency in some cases.
>>
>> - Bob
> It was a suggestion...

You mean a suggestion for the language,
or a suggestion for a compiler optimization?

If the latter, well, I think the compiler ought
to do the optimization whether or not the code
uses extended return.

>...(you seems to really be afraid of this possible
> confusion)

Well, yeah, lots of people seem to think that
extended return does much more than it does.
I'm just trying to help avoid that confusion. ;-)

- Bob