On Wednesday, 18 June 2014 at 04:38:25 UTC, Meta wrote:
On Wednesday, 18 June 2014 at 01:31:33 UTC, Sebastian Unger wrote: There's no head const in D, but you can emulate it. This is a *very* basic example that you can expand upon.

http://dpaste.dzfl.pl/55cb22153fcc

Thanks for that link. Yes, that is close. I'd even feel reasonaly well about it if it was in phobos so everybody can use the mechanism consistently.

It does not however, quite meet the mark of "with ease". But it is possibly an acceptable hack around a shortcoming in the language. Comming from C++, it's not as though I'm not used to those. Just a shame to have to resort to it when D is so pretty close to getting rid of dirty hacks more or less completely.

Cheers,
Seb

Reply via email to