std.sumtype?

ryuukk_ ryuukk_ at gmail.com
Thu Mar 18 18:40:49 UTC 2021


On Thursday, 18 March 2021 at 18:15:29 UTC, Paul Backus wrote:
> On Thursday, 18 March 2021 at 18:06:45 UTC, ryuukk_ wrote:
>> I'm not a fan of the syntax.. why is it a library instead of a 
>> language feature?..
>
> Because it's easier to write a library than to go through the 
> whole process of writing a DIP for a new language feature, 
> getting it accepted, and implementing it in the compiler.
>
> If you or anyone else wants to write a DIP to add sum types to 
> D as a language feature, I will happily support the effort, but 
> I am not going to do it myself.
>

The syntax is a result of it not being a language feature (the 
lib itself is perfectly fine, don't get me wrong! but the problem 
i have is it'd be better as a language feature)

I'd love to help create a DIP for it, but making it as a lib now, 
and then removing it few months/year later will feel bad because 
that's gonna be code people will have to change, again, hence the 
importance of not taking shortcuts, we need think long term


More information about the Digitalmars-d mailing list