comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com (Ted Dennison)
Subject: Re: Let's change semantics of "use type"
Date: 11 Nov 2002 07:59:47 -0800
Date: 2002-11-11T15:59:47+00:00	[thread overview]
Message-ID: <4519e058.0211110759.3ebbf128@posting.google.com> (raw)
In-Reply-To: 3dcb8347$0$299$bed64819@news.gradwell.net

porton@ex-code.com (Victor Porton) wrote in message news:<3dcb8347$0$299$bed64819@news.gradwell.net>...
> I am suggesting (for the next Standard) to change the semantics of "use
> type" so that it would make visible not only primitive _operators_, but
> all primitive _operations_.

Ick.

> The rationale is that this is a convenient way for dealing with a type 
> imported from a package without the need of many rename directives.  These

I've done quite a bit of tagged type programming in Ada95, and I have
*never* used a rename that way. In fact, I don't believe I've used a
single rename in Ada95 ever...

> So in certain sense the current Ada is not perfectly readable.) With "use
> all type" programmers will less tend to write multi-level designators
> which are both unreadable (especially when there are several such

Its "unreadable" only if things are misnamed. A decent Ada developer
should realize how his services are going to look when the clients try
to use them in code, and name them accordingly.

> designators in an expression) and error-prone as one may forget y in
> x.y.z (mistakedly writing x.z) and get wrong behavior of the program.

I'm not exactly sure how that could happen. Routines can't be
"primitive" and exist in different packages. So the situation you
envision would not make it past the compiler.

Additionally, anyone who makes a package that is named after an
"uncle" package needs to be worked over with a cluestick until
enlightenment is achieved.



  parent reply	other threads:[~2002-11-11 15:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-08  9:20 Let's change semantics of "use type" Victor Porton
2002-11-08 12:01 ` Adrian Hoe
2002-11-08 13:38 ` Robert A Duff
2002-11-08 20:52   ` Randy Brukardt
2002-11-08 18:12 ` Victor Porton
2002-11-09 15:20   ` Robert A Duff
2002-11-11  5:28 ` Victor Porton
2002-11-11 15:22   ` Robert A Duff
2002-11-11 15:59 ` Ted Dennison [this message]
2002-11-12  8:24   ` R. Tim Coslet
2002-11-12 15:39     ` Ted Dennison
2002-11-12 18:18       ` Preben Randhol
2002-11-12 17:29 ` Victor Porton
2002-11-12 17:32 ` Victor Porton
2002-11-18  1:25 ` Richard Riehle
2002-11-19  4:13 ` Victor Porton
replies disabled

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