Missing python-like chaining in D
H. S. Teoh
hsteoh at quickfur.ath.cx
Thu Feb 24 21:05:49 UTC 2022
On Thu, Feb 24, 2022 at 08:57:02PM +0000, forkit via Digitalmars-d wrote:
[...]
> e.g.
>
> i < 4 < n
>
> once you know what the above means, it will take less cognitive effort than
>
> i < 4 && 4 < n
>
> not to mention less typing.
>
> so everyone's a winner when you remove 'unncessary' verbosity.
There's std.algorithm.ordered which lets you write:
ordered(i, 4, n)
which isn't too bad, it just needs to be promoted more so that people
are more aware of it.
T
--
People tell me that I'm paranoid, but they're just out to get me.
More information about the Digitalmars-d
mailing list