Wanted: best way to express default expectations

Dennis dkorpel at gmail.com
Mon Oct 14 13:26:56 UTC 2019


On Monday, 14 October 2019 at 13:00:14 UTC, Dukc wrote:
> But I still think an `if_not`, `ifnot` or some similar keyword 
> would have it's place. Does anybody agree? Read: might it be 
> worth a DIP?

I think a new keyword for this has very little chance.
One related idea is making `if !(expression) statement` allowed 
in the grammar (! outside parentheses) which makes it easier to 
read fully negated if-statements. It hasn't been that well 
received though:

https://github.com/dlang/dmd/pull/8440
https://forum.dlang.org/post/pgkv3t$15te$1@digitalmars.com



More information about the Digitalmars-d mailing list