[Dlang-internal] How about `and` and `or` like in Python?
Mike Parker
aldacron at gmail.com
Wed Oct 2 03:18:56 UTC 2019
On Tuesday, 1 October 2019 at 20:34:19 UTC, Murilo wrote:
>
> Alright. That makes sense. But what about making it capitalized
> as And, Or and Not, that will not conflict with keywords.
This has the same problem. You're introducing new keywords that
will break any code using those words as identifiers.
What you're proposing has consequences. Aside from the potential
for breakage, it adds complexity to the language. Opinions about
improved readability and nicer aesthetics simply aren't strong
enough to justify such a change (what gives your opinions more
weight over those who disagree with you?).
Consider that when one person wanted to *remove* the keyword
`body` as used in function contracts and replace it with another
existing keyword, `do`, he wrote a DIP for it:
https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1003.md
And that's just to take something away from the language. You
want to add something so that we'll have two ways of doing the
same thing.
So a suggestion in the forums is not going to be the way to get
this feature added. You'd need to write a DIP presenting a strong
justification for the added complexity and the potential code
breakage. And given the nature of the feature, I'd say you'd be
fighting an uphill battle (meaning, I don't think there is a
strong enough case to be made).
More information about the Dlang-internal
mailing list