I'm glad throw is now an expression

Vladimir Panteleev thecybershadow.lists at gmail.com
Thu May 19 09:11:45 UTC 2022


On Wednesday, 18 May 2022 at 17:35:14 UTC, Walter Bright wrote:
> More thinking about this suggests that int+noreturn should be 
> typed as noreturn.

How so? This makes sense to me:

```d
int divide(int dividend, int divisor)
{
     return divisor == 0
         ? assert(false, "You shall not divide by zero")
         : dividend / divisor;
}
```



More information about the Digitalmars-d mailing list