Made a Rage-Comic about D

Robert Clipsham robert at octarineparrot.com
Sat Jun 23 17:08:26 PDT 2012


On Saturday, 23 June 2012 at 23:37:11 UTC, Jonathan M Davis wrote:
> On Saturday, June 23, 2012 13:46:51 David wrote:
>> The cool thing is, I wasn't able to track it down until now, 
>> since line
>> numbers are completly messed up because of a heavy use of 
>> mixin() and CTFE.
>
> Which is why I _never_ put newlines in string mixins.
>
> - Jonathan M Davis

#line is a godsend when working with string mixins.

mixin(`#line ` ~ (30_000 + __LINE__).stringof ~ `
// Some really long code here
// The line numbers will be correct but plus 30_000
// Making it fairly simple to debug.
`);

--
Robert
http://octarineparrot.com/


More information about the Digitalmars-d mailing list