Looking for champion - std.lang.d.lex

Don nospam at nospam.com
Fri Oct 22 00:24:57 PDT 2010


Jonathan M Davis wrote:
> On Thursday 21 October 2010 15:12:41 Ellery Newcomer wrote:
>> and how about
>>
>> 6. ctfe compatible
>>
>> ?
> 
> That would seem like a good idea (though part of me cringes at the idea of a 
> program specifically running the lexer (and possibly the parser) as part of its 
> own compilation process), but for the main purpose of being used for tools for 
> D, that would seem completely unnecessary. So, I'd say that it would be a good 
> idea to make it CTFE-able if it is at all reasonable to do so but that if making 
> it CTFE-able would harm the design for more typical use, then it shouldn't be 
> made CTFE-able. Personally, I don't have a good feel for exactly what is CTFE-
> able though, so I have no idea how easy it would be to make it CTFE-able. 
> However, it does seem like a good idea if it's reasonable to do so. And if it's 
> not, hopefully as dmd's CTFE capabilities become more advanced, it will become 
> possible to do so.
> 
> - Jonathan M Davis

In the long term, the requirements for CTFE will be pretty much:
1. the function must be @safe (eg, no asm).
2. the function must be pure
3. the compiler must have access to the source code

You'll probably satisfy all those requirements anyway.


More information about the Digitalmars-d mailing list