import concerns (was Re: Historical language survey)
Lionello Lunesu
lionello at lunesu.remove.com
Mon Jul 10 12:15:10 PDT 2006
"Walter Bright" <newshound at digitalmars.com> wrote in message
news:e8qf7k$2q0d$1 at digitaldaemon.com...
> What I don't get is what is "unprofessional" or hackish about alias? Is it
> (as I posted to Kris) that it looks too much like #define?
I think the problem with "alias" is that you'll have multiple ways to refer
to the imported name.
You can use the FQN, the global one (in case there are no conflicts) and
finally the aliased name. And there's no restriction: the code in that
module could be using any of the three alternatives, or worse still, all!
You'll have to keep track on a piece of paper (or comments :) that .foo ==
lib.bar.foo == myfoo.
An "import x as y" would leave only 1 alternative: y.
"static import" will still have two, the FQN and the alias.
(I liked "import x alias y", by the way)
> Each idea goes through a gauntlet of:
> 1) is lack of this idea turning users away from D
> 2) how much power it adds
> 3) how much complexity it adds
> 4) is it consistent with the rest of D
> 5) how hard is it to implement
> 6) how does it rank in importance against all the other ideas
Lets make this the official yardstick to which to subject all future
proposals.
If you have an opinion on any feature request, no matter how silly the
request, you should write a small reaction. Perhaps just a comment like
"denied, see item 6 of The List". Of course, people will want to argue with
you futher, but it's likely that the community can take it from there.
L.
More information about the Digitalmars-d
mailing list