std.d.lexer: pre-voting review / discussion
Kapps
opantm2+spam at gmail.com
Wed Sep 11 16:22:44 PDT 2013
On Wednesday, 11 September 2013 at 19:57:28 UTC, Piotr Szturmaj
wrote:
> On 11.09.2013 20:49, Walter Bright wrote:
>> On 9/11/2013 8:01 AM, Dicebot wrote:
>>> std.d.lexer is standard module for lexing D code, written by
>>> Brian Schott
>>
>> Thank you, Brian! This is important work.
>>
>> Not a thorough review, just some notes from reading the doc
>> file:
>>
>> 1. I don't like the _ suffix for keywords. Just call it
>> kwimport or
>> something like that.
>>
>> 8. 'default_' Again with the awful practice of appending _.
>
> Delphi designers realized this problem years ago and they came
> up with a solution:
> http://docwiki.embarcadero.com/RADStudio/XE4/en/Fundamental_Syntactic_Elements#Extended_Identifiers
>
> Basically, Delphi allows escaping reserved identifiers with a
> '&'. I wonder how D solves that problem when interfacing to COM
> classes if they have for example a function named "scope".
C# allows this as well. For example, you can have:
void MyVoid(string @int) { ... }
The name is actually int for purposes of reflection and the like,
the @ just tells the compiler that it's not a keyword.
More information about the Digitalmars-d
mailing list