Thread overview |
---|
September 21, 2022 [Issue 23349] Disallow assignments in ?: expressions | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23349 Bolpat <qs.il.paperinik@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |qs.il.paperinik@gmail.com -- |
September 22, 2022 [Issue 23349] Disallow assignments in ?: expressions | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23349 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |razvan.nitu1305@gmail.com --- Comment #1 from RazvanN <razvan.nitu1305@gmail.com> --- Why would we do this? The else-part is required to have parenthesis because of the ambiguity, but as far as I can see there is no way you could have an ambiguity for the assignment in the then-part. -- |
September 22, 2022 [Issue 23349] Disallow assignments in ?: expressions | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23349 --- Comment #2 from Bolpat <qs.il.paperinik@gmail.com> --- (In reply to RazvanN from comment #1) > Why would we do this? The else-part is required to have parenthesis because of the ambiguity, but as far as I can see there is no way you could have an ambiguity for the assignment in the then-part. It’s not about ambiguity, it’s about consistency. -- |
September 22, 2022 [Issue 23349] Disallow assignments in ?: expressions | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23349 --- Comment #3 from RazvanN <razvan.nitu1305@gmail.com> --- (In reply to Bolpat from comment #2) > (In reply to RazvanN from comment #1) > > Why would we do this? The else-part is required to have parenthesis because of the ambiguity, but as far as I can see there is no way you could have an ambiguity for the assignment in the then-part. > > It’s not about ambiguity, it’s about consistency. I don't see why we need to limit something just for the sake of consistency. The limitation on the then-part is put in place because of the possibility of ambiguous cases. Since the then-part is always unambiguous, no limitation is put in place. I find that the argument of consistency is not valid in this case. Therefore, my suggestion is to close this as "WONTFIX". -- |
September 23, 2022 [Issue 23349] Disallow assignments in ?: expressions | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23349 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX -- |
Copyright © 1999-2021 by the D Language Foundation