A nice D coding pattern

Tobias Pankrath via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Nov 25 10:58:39 PST 2014


> void main() {
>     // Created at compile-time.
>     enum something = "........".Foo;
>

I don't think we should encourage UFCS with typenames or 
uppercase names. If anything, it does not provide any benefit in 
this case and Foo(".....") is much more clearer without any 
syntactical overhead.


More information about the Digitalmars-d-learn mailing list