Worst ideas/features in programming languages?

James Blachly james.blachly at gmail.com
Wed Oct 13 21:00:33 UTC 2021


On 10/12/21 1:29 AM, surlymoor wrote:
> I just want to be able to have a returned value be implicitly wrapped if 
> its type is part of the `SumType` returned by the function.
> 
> ```d
> // -preview=shortenedMethods is awesome
> SumType!(int, string) div(int a, int b) => b != 0 ? a : "Divisor is zero";
> ```

Hear, hear


More information about the Digitalmars-d mailing list