interesting semantic possible?

JS js.mdnq at gmail.com
Sun Jul 21 17:12:31 PDT 2013


BTW, I'm not saying D can't do anything like this

enum Dir { Left, Right, Both }

string strip(Dir dir = Dir.Both)(string s)

but one has to call it like

strip!(Dir.Left)(s); (or if using strings, strip!"Left"(s))

Possibly, to make it easier the compiler and localize the enum if 
one is used:

strip!Left(s); // compiler changes to strip!(Dir.Left)(s)



More information about the Digitalmars-d-learn mailing list