DIP 1003 Formal Review
Basile B. via Digitalmars-d
digitalmars-d at puremagic.com
Wed May 17 02:57:41 PDT 2017
On Wednesday, 17 May 2017 at 09:53:49 UTC, MysticZach wrote:
> On Wednesday, 17 May 2017 at 08:03:13 UTC, Mike Parker wrote:
>> * Is it a good idea to remove body's status as a reserved
>> keyword?
>>
>> * If so, which option is best?
>> 1) Make it contextual
>> 2) Replace it with another keyword (`function` was suggested
>> in the DIP, `do` in this thread).
>> 3) A three-stage process of removal: make it optional, then
>> deprecate it, then remove it completely (meaning, no keyword,
>> reserved or contextual, is required for the function body in a
>> contract).
>
> Option 4) Keep `body`, but make it both contextual *and*
> optional. It becomes usable as an identifier, and those who
> think it's unnecessary are appeased. The downside is that
> different programmers will include it or not, based on
> arbitrary preferences.
The problem with this option is the IDEs. D syntax so far doesn't
require parsing to highlight, i.e you have a token and you know
what is it directly, and this without looking at the previous
tokens (which is basically what parsing does, detect token
patterns).
More information about the Digitalmars-d
mailing list