comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne Hibou57" <yannick_duchene@yahoo.fr>
Subject: Re: prefix of dereference must be a name?
Date: Mon, 3 Aug 2009 20:37:10 -0700 (PDT)
Date: 2009-08-03T20:37:10-07:00	[thread overview]
Message-ID: <aeee8832-35b7-4e97-82d3-aa57a3acf39b@s15g2000yqs.googlegroups.com> (raw)
In-Reply-To: a71f5e32-194e-46ac-8653-86f21c7aaeb2@j9g2000prh.googlegroups.com

On 4 août, 03:45, Adam Beneschan <a...@irvine.com> wrote:
> You should look over AI05-0003.  I think there's a fair amount of
> sympathy for your position; I agree that it would have been better to
> have less distinction between "names" and "expressions", but the
> problem just never made it high enough on the priority list.  It's
> simple to say "You should be able to use an expression with an
> operator wherever you could use the equivalent function call", but not
> at all simple to change the language rules consistently and make sure
> the change doesn't cause any other problems, and probably not at all
> simple for all the compiler vendors to make the necessary changes.
>
> AI05-0003 will fix one related issue, I think, to allow qualified
> expressions [Type'(Function_Call(...))] to be used where they
> currently can't.  I felt this one was important, because using
> qualified expressions is sometimes the only reasonable way to
> eliminate ambiguities in overloading cases---or at least the only non-
> clunky way.  In your examples, you *could* always replace (A+B) with
> "+"(A,B) to get around the problem, so it's not as important to have
> this fixed, and a decision has to be made about whether it's worth the
> effort.  But I agree that it would have been nice if the language had
> been designed "right" at the beginning.
>
>                                          -- Adam

Although I agree about your arguments for a more intuitive and less
badly-restrictive syntax, I still try to understand why it is like it
is, and I suppose there were some good reasons, like avoiding too
much deep expressions. Perhaps it was in the hope it would help
readability and maintenance, forcing the decomposition of some
expressions in intermediate steps.

While for the simple example you gave, “ Type'(Function_Call(...)) ”,
this hypothetical reason would surely not apply.



      reply	other threads:[~2009-08-04  3:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-30  7:09 prefix of dereference must be a name? Stephen Leake
2009-07-30 17:36 ` Yannick Duchêne Hibou57
2009-07-31 12:04   ` Stephen Leake
2009-07-31 12:23     ` Dmitry A. Kazakov
2009-07-31 21:49     ` Robert A Duff
2009-07-30 19:35 ` John B. Matthews
2009-08-03 14:44   ` Adam Beneschan
2009-08-03 17:46     ` John B. Matthews
2009-08-04  1:45 ` Adam Beneschan
2009-08-04  3:37   ` Yannick Duchêne Hibou57 [this message]
replies disabled

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