[Feature Request] Keywords for symbol operators
H. S. Teoh
hsteoh at qfbox.info
Sun Feb 25 22:18:36 UTC 2024
On Sun, Feb 25, 2024 at 08:13:40PM +0000, monkyyy via Digitalmars-d wrote:
> On Sunday, 25 February 2024 at 04:55:08 UTC, Danilo wrote:
> > What about adding [keyword
> > forms](https://en.cppreference.com/w/cpp/language/operator_alternative)
> > for some operator symbols, like in
> > [C++](https://en.cppreference.com/w/cpp/language/operator_logical) ?
> >
> > ```
> > Symbol | Keyword
> > ----------------
> > ! | not
> > != | noteq
> > |
> > && | and
> > || | or
> > |
> > & | bitand
> > | | bitor
> > ```
>
> whats the name of `foo["bar",1..5]*=Seq!(13.37,'a');`
```d
foo openSquareBracket openDoubleQuote bar closeDoubleQuote comma 1
doubleDot 5 closeSquareBracket multiplyAssign Seq
templateArguments openParenthesis 13.37 comma openSingleQuote a
closeSingleQuote closeParenthesis semicolon
```
See? Way more readable than the current cryptic syntax. ;-)
T
--
I am not young enough to know everything. -- Oscar Wilde
More information about the Digitalmars-d
mailing list