Reduce redundancy in alias
Frank Benoit
keinfarbton at googlemail.com
Thu Jun 5 01:07:00 PDT 2008
I use aliases in many case to import a symbol from somewhere into the
current scope. The identifier remains the same.
For example, alias to override
class D : B {
alias B.foo foo;
void foo( long a ){}
}
Or i want to make constant values available from somewhere else
import WINTYPES = tango.sys.win32.types;
class OS {
alias WINTYPES.WS_TABSTOP WS_TABSTOP;
// 2000 more
}
I think, it would be really handy, if i could simply write
alias B.foo;
So the rule would be
"If a FQN is aliased without an alias symbol name, the last part of the
FQN is taken as the alias symbol name."
More information about the Digitalmars-d
mailing list