[Dlang-internal] How about `and` and `or` like in Python?

Murilo murilomiranda92 at hotmail.com
Tue Oct 1 20:34:19 UTC 2019


On Tuesday, 1 October 2019 at 20:26:14 UTC, Dennis wrote:
> I used to program in a language (GML) that allowed both.
> I always preferred `not`, `and` and `or` over the symbols `!`, 
> `&&` and `||`.
> That being said, adding the keywords when the symbols are 
> already the standard is more harm than good.
>
> It creates more bikeshedding / style-guides / arguments over 
> which is the preferred way. There already is enough discussion 
> about "options" for brace styles, tabs/spaces, 
> snake_case/camelCase etc.
>
> It also breaks existing code that uses these proposed keywords 
> as identifiers.
> For example in fluent asserts, this is no longer valid when 
> `not` is a keyword: `x.should.not.be(null);`
> Other examples:

Alright. That makes sense. But what about making it capitalized 
as And, Or and Not, that will not conflict with keywords.


More information about the Dlang-internal mailing list