comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Let's change semantics of "use type"
Date: Fri, 8 Nov 2002 14:52:46 -0600
Date: 2002-11-08T14:52:46-06:00	[thread overview]
Message-ID: <usoa1ueab21t9e@corp.supernews.com> (raw)
In-Reply-To: wcc65v8i3lh.fsf@shell01.TheWorld.com

Robert A Duff wrote in message ...
>porton@ex-code.com (Victor Porton) writes:
>
>> 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_.
>
>Why not just "use" the package in which the type is declared?
>Why is this worth modifying the language?


There are some subtle differences in semantics (especially that you
don't need know the name of the package for a "use type"), but in
general, "use" is essentially the same as "use type all".

In general, I don't see the point. It seems that this is primarily a way
to get around a "no use" coding standard. However, such a standard would
almost certainly be revised to include "no use type all", so it wouldn't
help anything.

As far as avoiding long lists of renames, that's easy. Don't write them!
There's no point. Either use "use" when it is appropriate, use the full
dot notation, or (if the package names are too long to handle) rename
the package. (And for the latter, I'd suggest choosing better package
names is preferable.)

The vast majority of my code avoids use clauses. I don't have a problem
reading (or writing)
       Claw.Edit.Multiline.Create (...);
instead of
       Create (...);

              Randy.






  reply	other threads:[~2002-11-08 20:52 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 [this message]
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
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