Wanted: best way to express default expectations

Dukc ajieskola at gmail.com
Wed Oct 16 10:55:58 UTC 2019


On Monday, 14 October 2019 at 15:26:03 UTC, Jesse Phillips wrote:
> How is not what you want? I realize it doesn't use the same 
> foreach break structure, but then there is no alternative.

I think you nailed it - there is apparently no (better) 
alternative currently. So it's down to discussing DIP or no, and 
if yes, what should it propose.

>
>>
>> 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 don't think it is worth it and I do think the range based 
> approach is direction people should head.

After reading what Dennis wrote, I think I agree that relaxing 
parenthesis requirements for `if` statements (and perhaps 
`while`/`switch`/`with` while on it) is a better way to go.

But while I agree that pursuing range pipelines is a good general 
diretion, sometimes it is just more practical to do stuff in the 
imperative way - the langauge should not discourage that.




More information about the Digitalmars-d mailing list