Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
March 29, 2021 [Issue 21783] Add `if` as an operator | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21783 Bolpat <qs.il.paperinik@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |qs.il.paperinik@gmail.com -- |
March 29, 2021 [Issue 21783] Add `if` as an operator | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21783 --- Comment #1 from Bolpat <qs.il.paperinik@gmail.com> --- It should have read: > The best I could come up with is > > rhs ? lhs : true > > which [...] -- |
March 30, 2021 [Issue 21783] Add `if` as an operator | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21783 --- Comment #2 from anonymous4 <dfj1esp02@sneakemail.com> --- bool conditional(bool c, bool check) { return c?check:true; } void divMod(int a, int b, int q, int r) in (b > 0) out (; conditional(a < 0, q <= 0)) out (; conditional(a > 0, q >= 0)) out (; conditional(a < 0, r <= 0)) out (; conditional(a > 0, r >= 0)) -- |
March 31, 2021 [Issue 21783] Add `if` as an operator | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21783 --- Comment #3 from Bolpat <qs.il.paperinik@gmail.com> --- Unless `conditional` is part of object.d, it needs to be defined or imported which is a bummer for pre- and post-conditions. Also, it's not immediately clear what it means. -- |
December 17, 2022 [Issue 21783] Add `if` as an operator | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=21783 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P4 -- |
Copyright © 1999-2021 by the D Language Foundation