On Monday, 28 November 2016 at 02:17:20 UTC, Dicebot wrote:
On 11/24/2016 05:29 PM, WM.H wrote:
On Saturday, 19 November 2016 at 21:16:15 UTC, Dicebot wrote:
DIP 1003 is merged to the queue and open for public informal
Initial merged document:
If you want the change to be approved and have ideas how to
improve it to better match on
existing published reviews - please submit new PR with
editorial and ping original author.
This DIP fixes the problem for "body" but not for the other
keywords. After all the problem may exist for other keywords.
Was a new pragma considered ? For example an identifier alias.
pragma(idAlias, "body", "body_" )
AFAIU, the point of this DIP is that "body" is standing out
from other keywords being used only in one very specific
context and being a very common english word at the same time.
Your proposal has a completely different (and much more
Yes. But while it's clear that "body" is a keyword that's less
related to programming languages than the others (i.e more usable
as identifier), it's not actually that mad to imagine a generic
approach. For example Object Pascal has such a feature:
which is not well known, as I've myself discovered this just 3
In D there would be the "#" token that's not really used, which
could serve to escape keywords, while still considering them as
identifier when it's needed, e.g
writeln("'", #body.stringof, "'");
would output: 'body'