Idioms you use

lobo via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 28 19:26:11 PDT 2015


On Monday, 28 September 2015 at 21:40:45 UTC, Freddy wrote:
> Are any D idioms you use that you like to share?
> Heres one of mine
> ---
> enum ctfe =
> {
>     return 0xdead & 0xbad;
> }();
> ---

What does this do and where would it be useful in my code?

For D idioms I usually go here...you may want to submit a PR:

http://p0nce.github.io/d-idioms/

Phobos is another good source of how to do X in D.

bye,
lobo


More information about the Digitalmars-d mailing list