"Walter Bright" <newshou...@digitalmars.com> wrote in message news:i9qd8q$1ls...@digitalmars.com... > > 4. the tokens should be a value type, not a reference type
I'm curious, is your reason for this purely to avoid allocations during lexing, or are there other reasons too? If it's mainly to avoid allocations during lexing then, maybe I've understood wrong, but isn't D2 getting the ability to construct class objects in-place into pre-allocated memory? (or already has the ability?) If so, do you think just creating the tokens that way would likely be close enough?