On Wednesday, 8 August 2018 at 20:54:13 UTC, Paul Backus wrote:
SumType is a generic sum type for modern D. It is meant as an
alternative to `std.variant.Algebraic`.
New point release, 0.5.3, with the following updates:
- SumType now uses the smallest possible integer type for its tag
(e.g., `
On Friday, 10 August 2018 at 21:28:40 UTC, Everlast wrote:
Yes, but
alias Z = SumType.Union(X,Y);
is not the same as
alias Z = SumType!(int, float, string, complex, vector).
In the first case Z is actually a union of 2 types while in the
second it is of 5. There is a subtle difference in
On Friday, 10 August 2018 at 19:19:39 UTC, Paul Backus wrote:
On Friday, 10 August 2018 at 13:11:13 UTC, Everlast wrote:
On Friday, 10 August 2018 at 12:35:18 UTC, Everlast wrote:
It would be nice if some actual examples could be given. The
help on dub is a bit confusing because the the code
On Friday, 10 August 2018 at 13:11:13 UTC, Everlast wrote:
On Friday, 10 August 2018 at 12:35:18 UTC, Everlast wrote:
It would be nice if some actual examples could be given. The
help on dub is a bit confusing because the the code is not
complete.
In addition to the example on the dub page,
On Friday, 10 August 2018 at 12:35:18 UTC, Everlast wrote:
On Thursday, 9 August 2018 at 15:56:12 UTC, Paul Backus wrote:
On Wednesday, 8 August 2018 at 20:54:13 UTC, Paul Backus wrote:
SumType is a generic sum type for modern D. It is meant as an
alternative to `std.variant.Algebraic`.
Versi
On Thursday, 9 August 2018 at 15:56:12 UTC, Paul Backus wrote:
On Wednesday, 8 August 2018 at 20:54:13 UTC, Paul Backus wrote:
SumType is a generic sum type for modern D. It is meant as an
alternative to `std.variant.Algebraic`.
Version 0.5.2, with fixes for the bugs reported in this thread,
On Wednesday, 8 August 2018 at 20:54:13 UTC, Paul Backus wrote:
SumType is a generic sum type for modern D. It is meant as an
alternative to `std.variant.Algebraic`.
Version 0.5.2, with fixes for the bugs reported in this thread,
is now available. Thanks to vit for their detailed feedback!
I
On Thursday, 9 August 2018 at 07:52:12 UTC, vit wrote:
SumType without initialization doesn't fail if first type has
@disabled this().
It did fail for me, but it also failed *with* initialization too,
so there was definitely a bug there.
method toString is not template. (why is there in the
On Thursday, 9 August 2018 at 01:04:43 UTC, Paul Backus wrote:
On Thursday, 9 August 2018 at 00:11:22 UTC, Seb wrote:
On Thursday, 9 August 2018 at 00:07:05 UTC, Seb wrote:
(It uses the version from DUB and updates itself once daily,
but somehow dub still lists 0.4.1 at the moment)
It looks l
On Thursday, 9 August 2018 at 01:04:43 UTC, Paul Backus wrote:
...
@safe opAssign can call @system postblit:
bool moved = false;
struct S{
this(this)@system{
moved = true;
}
}
void main()@safe{
auto st = SumType!(S).init;
st = S.init;
assert(moved == true);
}
ch
On Thursday, 9 August 2018 at 01:04:43 UTC, Paul Backus wrote:
On Thursday, 9 August 2018 at 00:11:22 UTC, Seb wrote:
On Thursday, 9 August 2018 at 00:07:05 UTC, Seb wrote:
(It uses the version from DUB and updates itself once daily,
but somehow dub still lists 0.4.1 at the moment)
It looks l
On Thursday, 9 August 2018 at 00:11:22 UTC, Seb wrote:
On Thursday, 9 August 2018 at 00:07:05 UTC, Seb wrote:
(It uses the version from DUB and updates itself once daily,
but somehow dub still lists 0.4.1 at the moment)
It looks like you didn't push the git tag to GitHub:
https://github.com/p
On Thursday, 9 August 2018 at 00:07:05 UTC, Seb wrote:
(It uses the version from DUB and updates itself once daily,
but somehow dub still lists 0.4.1 at the moment)
It looks like you didn't push the git tag to GitHub:
https://github.com/pbackus/sumtype/releases
On Wednesday, 8 August 2018 at 20:54:13 UTC, Paul Backus wrote:
SumType is a generic sum type for modern D. It is meant as an
alternative to `std.variant.Algebraic`.
Features:
- Pattern matching, including support for structural matching
(*)
- Self-referential types, using `This`
- Work
On Wednesday, 8 August 2018 at 21:57:07 UTC, vit wrote:
Nice,
but destructor SumType.~this() can call destroy on reference
type like class:
Whoops. Good catch. I've pushed a fix, tagged as version 0.5.1.
On Wednesday, 8 August 2018 at 20:54:13 UTC, Paul Backus wrote:
SumType is a generic sum type for modern D. It is meant as an
alternative to `std.variant.Algebraic`.
Features:
- Pattern matching, including support for structural matching
(*)
- Self-referential types, using `This`
- Work
SumType is a generic sum type for modern D. It is meant as an
alternative to `std.variant.Algebraic`.
Features:
- Pattern matching, including support for structural matching
(*)
- Self-referential types, using `This`
- Works with `pure`, `@safe`, `@nogc`, and `immutable` (*)
- Zero run
17 matches
Mail list logo