On Fri, May 12, 2017 at 04:17:03PM +0000, Mike Parker via Digitalmars-d wrote: > The first stage of the formal review for DIP 1003 [1], "Remove body as > a Keyword", is now underway. From now until 11:59 PM ET on May 26 > (3:59 AM GMT on May 27), the community has the opportunity to provide > last-minute feedback. If you missed the preliminary review [2], this > is your chance to provide input. > > At the end of the feedback period, I will submit the DIP to Walter and > Andrei for their final decision. Thanks in advance to those of you who > participate. > > [1] > https://github.com/dlang/DIPs/blob/fbb797f61ac92300eda1d63202157cd2a30ba555/DIPs/DIP1003.md > > [2] http://forum.dlang.org/thread/[email protected]
I vote for Option 3: make `body` an optional keyword for a release, then deprecate it for another release, then Kill It With Fire. I completely agree with the rationale stated in the DIP, that `body` is a commonly used identifier and therefore should not be a keyword; but even more so that `body` serves little purpose in the language because it is used only in *one* context, and in that context it's not even strictly necessary as no grammar ambiguity would arise from removing it. I disagree that `function` is not overloaded: it *will* be overloaded if option 2 is chosen, because `function` currently means function *pointer*, not the function body itself. For this reason, I oppose Option 2. I also dislike option 1 because contextual keywords represent incongruity in the language, and lately I've come to the conclusion that incongruities will ultimately become inhibitors of progress and sources of problems. (There is more to it than that, but this subject in its generality is OT here so I'll just leave it at that.) Furthermore, as I've said, `body` is not even necessary in the single, only context in which it's used. It does not serve to disambiguate anything, because no grammar ambiguity would result from its absence. So I regard it something completely redundant that the language would do better without. Even though option 3 entails eventual code breakage, I for one would welcome that because it would reduce the amount of unnecessary syntax in my code. A possible compromise could be to make `body` both contextual and optional, so that no existing code will break, but new code also can be freed from the unnecessary syntactic noise and the identifier `body` can be freed up for user use. T -- People say I'm indecisive, but I'm not sure about that. -- YHL, CONLANG
