Lexer in D

Dmitry Olshansky dmitry.olsh at gmail.com
Sun Mar 3 09:09:09 PST 2013


03-Mar-2013 20:45, Namespace пишет:
>> Just rip off the const why would you need it anyway?
>
> The data in 'tokens' are final, so why they should not be const?

Then just return const(Token) like simple full const. In general I'd 
avoid marking data as bitwise const unless that is actually true. For 
all you know some algorithm up above might tweak existing token values 
directly.

> What exactly is the problem if there are const member? Is this a known
> problem?

It's quite old and ugly as a lot of things would need to bit-blit stuff 
over it and fail to do so.

> Otherwise, I will go and investigate it.


-- 
Dmitry Olshansky


More information about the Digitalmars-d-learn mailing list