snarwin at gmail.com
Wed Nov 25 00:20:54 UTC 2020
On Tuesday, 24 November 2020 at 23:02:15 UTC, Dibyendu Majumdar
> Thanks - I was suggesting adding a description to the
> documentation, unless it is already there. Also an ABI
> specification would be helpful - what happens when a value is
> passed to a C program.
Thanks for the suggestion. The documentation describes SumType as
"a tagged union," which I think is enough to get the point
across, but I should probably include a link to a definition in
case the reader is unfamiliar with that term.
The exact memory layout and ABI of SumType is deliberately left
unspecified. It's an implementation detail that client code isn't
supposed to rely on. If you want to pass a SumType's value to a C
function, you will first have to extract it using pattern
More information about the Digitalmars-d-announce