if-expressions
Tomer Filiba via Digitalmars-d
digitalmars-d at puremagic.com
Sun Aug 28 06:48:43 PDT 2016
On Sunday, 28 August 2016 at 11:14:00 UTC, Cauterite wrote:
> Mm you're right, I had the same concern. The ':' or '?' could
> both be just as easily used here, but I figured since
> IfExpressions kind of make ternary conditionals obsolete, it'd
> be better to 'free-up' the '?' token for other purposes. Maybe
> you have some other ideas?
Python uses `x = 5 if cond else 6`, which is by far more readable
-tomer
More information about the Digitalmars-d
mailing list