std.sumtype?
Paul Backus
snarwin at gmail.com
Thu Mar 18 18:15:29 UTC 2021
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.
> Because now you depend on ``std``
`std.sumtype` has no non-optional dependencies on Phobos outside
of compile time, so you can use it even if you do not want to
depend on anything else in `std`.
More information about the Digitalmars-d
mailing list