Idioms you use

Cauterite via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 29 00:51:21 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?

I'm not sure if these fit under the definition of 'idiom', but 
they sort of areā€¦ I think.
http://dpaste.dzfl.pl/f66a76a7411f

You could even extend the concept with opDispatch to achieve 
syntax like this:
pinvoke.psapi.GetProcessImageFileNameW!uint(...);

I've used a similar technique (+ caching) to lazily load OpenGL 
extensions. It worked really well.


More information about the Digitalmars-d mailing list