First Draft: opUnwrapIfTrue

user1234 user1234 at 12.de
Fri Mar 20 14:48:09 UTC 2026


On Thursday, 12 March 2026 at 14:18:00 UTC, Ogion wrote:
> On Thursday, 26 February 2026 at 13:53:41 UTC, Richard (Rikki) 
> Andrew Cattermole wrote:
>> A new operator overload to allow if statements to 
>> automatically unwrap result types and ensure that the check is 
>> called prior to, similar to foreach statements support of 
>> ranges.

I think that is not a good design.

```
assert(result);
```

Problems:

1. you are not sure the result is really checked ("-release" has 
for effect to disable assertions)
2. you dont create a branch for if the result is okay


More information about the dip.development mailing list