What would need to be done to get sdc.lexer to std.lexer quality?
Walter Bright
newshound2 at digitalmars.com
Thu Aug 2 12:59:44 PDT 2012
On 8/2/2012 12:04 AM, David Nadlinger wrote:
> On Thursday, 2 August 2012 at 05:36:37 UTC, Walter Bright wrote:
>> Using a class implies an extra level of indirection, […]
>> Use pass-by-ref for the Token.
>
> How is pass-by-ref not an extra level of indirection?
If you have a "Lexer" instance that contains by value the current Token, then
you deref to get to "Lexer". If Token is a class, then you deref to get "Lexer"
and then deref again to get the current Token.
More information about the Digitalmars-d
mailing list