comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Non_Primitive Operations and Object.Operation Resolution
Date: Fri, 22 Apr 2016 17:37:04 -0700
Date: 2016-04-22T17:37:04-07:00	[thread overview]
Message-ID: <nfeft8$ldt$1@dont-email.me> (raw)
In-Reply-To: <nfe8aq$r97$1@loke.gir.dk>

On 04/22/2016 03:24 PM, Randy Brukardt wrote:
>
> My view is that anytime you have more than one visible (note: not
> necessarily *directly* visible) entity with the same name and same profile,
> but has different semantics, you have unnecessarily tricky code, regardless
> of the legality of that code. A reader of the code could very well refer to
> the wrong declaration (programmers are not great at figuring out the nuances
> of Ada visibility rules), and that could lead to problems during program
> maintance (especially if that maintenance is done by someone other than the
> original author). As such, I'd suggest that the routine in the body be named
> something like Safe_Element just to reduce this potential confusion. (I know
> *I* could very well use the wrong routine in debugging this package.)

It seems clear to me, but I guess I'm weird. Generic iterators (which I've been 
using since Ada 83 was the current version) seem clear to me, but I recall 
reading somewhere that some ARG members found them confusing.

> Still, legal Ada code ought to compile. even when it isn't a good idea. :-)

Absolutely.

-- 
Jeff Carter
"Go and boil your bottoms."
Monty Python & the Holy Grail
01

  reply	other threads:[~2016-04-23  0:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20 23:59 Non_Primitive Operations and Object.Operation Resolution Jeffrey R. Carter
2016-04-21 20:28 ` Randy Brukardt
2016-04-21 21:13   ` Jeffrey R. Carter
2016-04-22  6:27     ` AdaMagica
2016-04-22 18:24       ` Jeffrey R. Carter
2016-04-22 22:24     ` Randy Brukardt
2016-04-23  0:37       ` Jeffrey R. Carter [this message]
2016-04-22 23:49 ` ytomino
2016-04-23  0:38   ` Jeffrey R. Carter
replies disabled

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