Rather D1 then D2

krzaq dlangmailinglist at krzaq.cc
Sat Sep 22 20:53:02 UTC 2018


On Saturday, 22 September 2018 at 20:40:14 UTC, Jonathan Marler 
wrote:
> On Saturday, 22 September 2018 at 19:04:41 UTC, Henrik wrote:
>> [...]
>
> That works for types but wouldn't work for keywords. Keywords 
> have special meaning in the lexical stage and you can't 
> extend/change the grammar of the language via an alias or 
> typedef.  You could do something like this with a preprocessor 
> but then you run into all sorts of other problems (i.e. #define 
> safe @safe).
>
> If you come up with other ideas then feel free to share.  No 
> one likes the current state but no one has come up with a good 
> solution yet.

C++ added contextual keywords, like `override` and `final`. If 
this can be done in C++, surely D is easier to parse?


More information about the Digitalmars-d mailing list