private alias ... isn't
David Medlock
noone at nowhere.com
Thu Jun 22 20:45:59 PDT 2006
In several of my utility libraries I have declared :
private alias char[] string;
I don't even type char[] any longer, I always type string.
Every so often I run into conflicts
alias textures.string conflicts with trees.string ...
(several lines like this)
I can usually monkey around with various imports, but its a PITA.
I don't see any possible benefit for this behavior, if it is intended.
*** If it is a bug, ignore the rest of this post.
Names serve a much larger purpose than locating a variable or method,
they are *abstractions*. Why then would a private member be available
elsewhere?
When I type private I expect that declaration to be removed from the
namespace when the parser leaves the file. Thats what *private*
means(the English word). Without power to hide some abstractions from
others we leave the world of 'logic' and enter the 'zeros and ones'
world again. Black boxes shouldn't be clear plexiglass.
-puzzling
DavidM
More information about the Digitalmars-d
mailing list