"using the result of a comma expression is not allowed"
bachmeier
no at spam.net
Sun Apr 21 23:27:59 UTC 2024
On Sunday, 21 April 2024 at 19:16:03 UTC, Don Allen wrote:
> And this whole discussion brings up the issue, for me, that
> 'if' and blocks are not expressions that can yield values. Both
> Rust and Zig support this. The separate and redundant
> conditional statement and expression in D is a holdover from C.
> I think this was a mistake in C and a bigger mistake in D,
> since we know more now about language design than when Dennis
> Ritchie designed C about 55 years ago.
I agree, and it's more than just those two languages, so I view
this as a small barrier to D. It's one of those things that might
not be major, but it does get annoying.
More information about the Digitalmars-d
mailing list