sumtypes for D

Nick Treleaven nick at geany.org
Tue Nov 29 18:50:43 UTC 2022


On Tuesday, 29 November 2022 at 02:53:27 UTC, Adam D Ruppe wrote:
> On Tuesday, 29 November 2022 at 02:33:21 UTC, deadalnix wrote:
>> I'm literally building a sum type
>
> Curious, what did you find lacking in std.sumtype?
>
> Same question to Walter.
>
> (btw I've never used it myself but this seems an obvious 
> question that needs to be answered by anyone doing their own 
> implementation, in or out of the language)

I haven't used it yet. But you can't implicitly convert an 
element type instance into a sum type struct instance. E.g. 
passing an int to a sum type struct function parameter.


More information about the Digitalmars-d mailing list