compile-time regex redux
Miles
_______ at _______.____
Wed Feb 7 10:16:31 PST 2007
Walter Bright wrote:
> The problem is that parsing strings using templates generates a large
> number of template instantiations, is (relatively) very slow, and
> consumes a lot of memory (at compile time, not runtime). For example,
> ParseInteger would need 4 template instantiations to parse 5678,
Why instead of doing perversions with templates, don't you add a proper
compile-time D interpreter for the purposes of generating code? Doing
loops with template recursion sucks a lot. It really looks the wrong
approach for the problem.
D already has static if() and tuple-foreach(). Just adding compile-time
variables and a static for() will be great. A compile-time D interpreter
will be awesome.
More information about the Digitalmars-d
mailing list