Re: sumtype 1.0.0

2020-11-24 Thread Paul Backus via Digitalmars-d-announce
On Wednesday, 25 November 2020 at 00:56:39 UTC, sarn wrote: On Wednesday, 25 November 2020 at 00:20:54 UTC, Paul Backus wrote: 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

Re: sumtype 1.0.0

2020-11-24 Thread sarn via Digitalmars-d-announce
On Wednesday, 25 November 2020 at 00:20:54 UTC, Paul Backus wrote: 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

Re: sumtype 1.0.0

2020-11-24 Thread Dibyendu Majumdar via Digitalmars-d-announce
On Wednesday, 25 November 2020 at 00:20:54 UTC, Paul Backus wrote: 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

Re: sumtype 1.0.0

2020-11-24 Thread Paul Backus via Digitalmars-d-announce
On Tuesday, 24 November 2020 at 23:02:15 UTC, Dibyendu Majumdar wrote: 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

Re: sumtype 1.0.0

2020-11-24 Thread Dibyendu Majumdar via Digitalmars-d-announce
On Tuesday, 24 November 2020 at 22:26:34 UTC, Paul Backus wrote: Nice. Is it possible to describe how these types are represented in memory? Anyone who uses unions and wants to use these would want to know whether these types are laid out like unions or not. What is the size of the type - is

Re: sumtype 1.0.0

2020-11-24 Thread Paul Backus via Digitalmars-d-announce
On Tuesday, 24 November 2020 at 21:52:47 UTC, Dibyendu Majumdar wrote: On Sunday, 15 November 2020 at 20:05:16 UTC, Paul Backus wrote: SumType is a generic discriminated union type for modern D. It is designed to be an improved alternative to `std.variant.Algebraic`. Nice. Is it possible to

Re: sumtype 1.0.0

2020-11-24 Thread Dibyendu Majumdar via Digitalmars-d-announce
On Sunday, 15 November 2020 at 20:05:16 UTC, Paul Backus wrote: SumType is a generic discriminated union type for modern D. It is designed to be an improved alternative to `std.variant.Algebraic`. Nice. Is it possible to describe how these types are represented in memory? Anyone who uses

Re: sumtype 1.0.0

2020-11-24 Thread Imperatorn via Digitalmars-d-announce
On Sunday, 15 November 2020 at 20:05:16 UTC, Paul Backus wrote: SumType is a generic discriminated union type for modern D. It is designed to be an improved alternative to `std.variant.Algebraic`. [...] Oh, this is actually useful 

Re: sumtype 1.0.0

2020-11-17 Thread jmh530 via Digitalmars-d-announce
On Tuesday, 17 November 2020 at 22:14:04 UTC, aliak wrote: [snip] Alright!!  A 1.0.0 release! Awesome work here! Agreed.

Re: sumtype 1.0.0

2020-11-17 Thread aliak via Digitalmars-d-announce
On Sunday, 15 November 2020 at 20:05:16 UTC, Paul Backus wrote: SumType is a generic discriminated union type for modern D. It is designed to be an improved alternative to `std.variant.Algebraic`. [...] Alright!!  A 1.0.0 release! Awesome work here!

sumtype 1.0.0

2020-11-15 Thread Paul Backus via Digitalmars-d-announce
SumType is a generic discriminated union type for modern D. It is designed to be an improved alternative to `std.variant.Algebraic`. Features: - Pattern matching, including: - Match-by-introspection ("if it compiles, it matches") (★) - Multiple dispatch (★) - Support for