Improving std.regex(p)

BCS none at anon.com
Sat Jun 19 17:43:08 PDT 2010


Hello Don,

>> == Quote from BCS (none at anon.com)'s article
>> 
>>> OTOH, and IHMO it should be avoided where you can, kinda like goto.
>>> (For one things, forget having usable line numbers in your error
>>> messages.)
>>> 
> Whenever that happens, it's a compiler bug.
> If you can produce a test case where that happens, please put it in
> Bugzilla.

The issue isn't that the error has no line number but that the line number 
is the line of the mixin or the line within the mixin (I forget which) to 
be useful you need both AND the full text of the mixin.

Yes there are ways around this but my original point is that in my experience, 
I can get just about as much done and for about the same effort with very 
little code being mixed in. My approach to this kind of problem has typically 
been to use CTFE to process input, template and or mixins to generate an 
AST (or whatever the problem demands) represented as a type and normal template, 
static ifs and tuple foreach to do the code generation with the occasional 
line of code mixed in here and there. The result of this is that most of 
the code is transparently visible as code rather than as string literals.

-- 
... <IXOYE><





More information about the Digitalmars-d mailing list