comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Constant as anonymous functions : the outer space beast is back
Date: Sun, 07 Feb 2010 11:22:20 -0500
Date: 2010-02-07T11:22:20-05:00	[thread overview]
Message-ID: <wccvde9audf.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 454c900f-85ed-4a40-ad13-a5b432261b99@c29g2000yqd.googlegroups.com

"Hibou57 (Yannick Duch�ne)" <yannick_duchene@yahoo.fr> writes:

> If it's not good for constants, so why should it be good for
> functions ?

You're right -- it would make sense to allow overloading for constants.
In fact, it would make sense to allow overloading for everything.
But you'd want to make the resolution rules weak, so that anything
that is likely to be confusing to programmers would be ambiguous and
therefore illegal.

Ada's resolution rules are too strong as it is.  For example:

    F(...).all := X;

I find it odd that the type of X is used to resolve which
F you're calling.

Another point: implicit hiding is evil.  It causes Beaujolais-like
effects.  Ada 95 makes it worse, because of child packages -- the
hiding can cross library unit boundaries.  Subunits already had
similar problems in Ada 83, but subunits are less useful, and
therefore rarer, than child packages.

- Bob



  parent reply	other threads:[~2010-02-07 16:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27  1:57 Constant as anonymous functions : the outer space beast is back Hibou57 (Yannick Duchêne)
2010-01-27  2:12 ` Robert A Duff
2010-01-27  2:15   ` Hibou57 (Yannick Duchêne)
2010-01-30  2:42   ` Randy Brukardt
2010-01-30  8:45     ` AdaMagica
2010-02-02 19:34       ` Hibou57 (Yannick Duchêne)
2010-02-05 21:51         ` Randy Brukardt
2010-02-05 22:41           ` Hibou57 (Yannick Duchêne)
2010-02-06  9:34             ` Dmitry A. Kazakov
2010-02-07 16:22         ` Robert A Duff [this message]
2010-02-09  0:22           ` Randy Brukardt
2010-02-02 19:36     ` Hibou57 (Yannick Duchêne)
2010-02-02 21:26     ` Adam Beneschan
2010-02-02 21:47       ` Hibou57 (Yannick Duchêne)
2010-02-03  0:55         ` Adam Beneschan
replies disabled

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