alias = compile-time variants?
bearophile
bearophileHUGS at lycos.com
Thu Jul 29 15:31:16 PDT 2010
Jason Spencer:
> In writing templates that make heavy use of alias parameters, does
> anyone else feel uneasy about whether the caller will pass a type, a
> value, or a schmoo?
Normally D is a mostly statically typed language (objects have a dynamic type), but sometimes template juggling is purely dynamically typed.
See also:
http://d.puremagic.com/issues/show_bug.cgi?id=3881
Being able to avoid the 'alias' and pass structs, templates and arrays (curiously char/wchar/dchar arrays are allowed, but not other types of arrays) to templates can be positive to avoid some troubles caused by alias template arguments.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list