Can operators "return" type?
bearophile
bearophileHUGS at lycos.com
Thu Nov 29 08:55:00 PST 2012
Zhenya:
> It would useful for some my project,if operators could be a
> template,that "return"
> type.
D operators are functions, and D functions return values. And in
D types are not values (unlike Python and several other
languages), unless you use a Typeinfo or something.
Maybe if you explain better what you are trying to do someone
will be able to suggest you an alternative solution. D is not as
flexible as Lisp, but it doesn't lack
meta-programming/type-processing capabilities.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list