[Feature Request] Keywords for symbol operators

Jonathan M Davis newsgroup.d at jmdavisprog.com
Mon Feb 26 19:55:40 UTC 2024


On Monday, February 26, 2024 10:46:10 AM MST cc via Digitalmars-d wrote:
> On Sunday, 25 February 2024 at 09:33:43 UTC, Andrea Fontana wrote:
> > On Sunday, 25 February 2024 at 07:42:16 UTC, Danilo wrote:
> >> Programming languages are evolving, like evolution is evolving.
> >>
> >> In 2024 it‘s probably better to support alternative keywords
> >> like ‚or‘, ‚and‘, ‚not‘ additionally to plain symbols like
> >> ˋ||ˋ, ˋ&&‘, ˋ!ˋ.
> >>
> >> Writing clear code using the english language is better
> >> than using cryptic symbols, in modern times.
> >
> > Quite easy to break existing code in this way. And we're going
> > to add more keywords and "noise".
> >
> > Andrea
>
> I dare say that anyone that uses `and`, `or`, or `not` as symbol
> names deserves to have their code broken.

Phobos already does it and has for years:

https://dlang.org/phobos/std_functional.html#not

And the way that it's used makes sense.

- Jonathan M Davis






More information about the Digitalmars-d mailing list