comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Lang. Design Query (no practical value)
Date: 1996/08/18
Date: 1996-08-18T00:00:00+00:00	[thread overview]
Message-ID: <DwC0D5.Kwr@world.std.com> (raw)
In-Reply-To: 9608151648.AA07688@most


In article <9608151648.AA07688@most>,
W. Wesley Groleau (Wes) <wwgrol@PSESERV3.FW.HAC.COM> wrote:
>What do some of you experienced multi-language folks think would have been
>the advantages or disadvantages of the following "alternate Ada" ?
...
>   A_Package.Do_Something ( This_Thing   => Voici,
>                            That_Thing  <=  Voila,
>                            Other_Thing <=> Aussi );
>where the choice of [which kind of] arrow must match the parameter mode.

This feature was in an early version of Ada (or Green?) in 1980 or
thereabouts.  The symbols were ":=", "=:", and ":=:".  I thought it was
a good idea.  I don't know why it was dropped.

More recently, somebody suggest sticking "in" and/or "out" in the call
syntax, for the same purpose.

>The writer of the call would not be able to avoid knowing the mode--but
>is that necessarily a Good Thing?

It's a Good Thing, IMHO, for the reader to be able to tell this kind of
information syntactically, at the call site.

>The comparison operator would be "overloaded" but the context would make
>it safe for the compiler, ...

This is a kind of overloading that has never appeared in Ada, and should
not appear in Ada.  It introduces an unnecessary implementation
complexity.  Not to mention potential confusion for the user (who,
remember, might not have memorized all the types that have "<=" defines
for them!)  Your idea is a good one, but it should use different
symbols.

>Anyway, the answer(s) won't change anything, but if things get slow on
>comp.lang.ada and you don't have any work to do......

I always like discussing language design, even though I have work to do.
;-)

- Bob




  reply	other threads:[~1996-08-18  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-15  0:00 Lang. Design Query (no practical value) W. Wesley Groleau (Wes)
1996-08-18  0:00 ` Robert A Duff [this message]
1996-08-18  0:00   ` Robert Dewar
replies disabled

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