| Thread overview | ||||||
|---|---|---|---|---|---|---|
|
August 31, 2012 Is anyone working on a new std.variant? | ||||
|---|---|---|---|---|
| ||||
Hi,
See title. I recently came across a bunch of pure/nothrow issues with std.variant and fixing them is just not possible with the current design (dynamic operator dispatch). I'd literally have to rewrite the whole thing or use some extremely dirty hacks resulting in implementation defined behavior. I'd rather rewrite it, but not if someone's already done it.
--
Alex Rønne Petersen
alex@lycus.org
http://lycus.org
| ||||
August 31, 2012 Re: Is anyone working on a new std.variant? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Alex Rønne Petersen | On Friday 31 August 2012 10:55:15 Alex Rønne Petersen wrote:
> Hi,
>
> See title. I recently came across a bunch of pure/nothrow issues with std.variant and fixing them is just not possible with the current design (dynamic operator dispatch). I'd literally have to rewrite the whole thing or use some extremely dirty hacks resulting in implementation defined behavior. I'd rather rewrite it, but not if someone's already done it.
Robert Jacques did, but I don't know what its current status is. He was supposedly going to submit it for review for Phobos, but it seems to have fallen through the cracks. And I think that Dmitry has been doing some work on it recently as well, but I don't think that he's yet embarked on rewriting the whole thing.
- Jonathan M Davis
| |||
August 31, 2012 Re: Is anyone working on a new std.variant? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Alex Rønne Petersen | On Friday, 31 August 2012 at 08:55:18 UTC, Alex Rønne Petersen wrote:
> Hi,
>
> See title. I recently came across a bunch of pure/nothrow issues with std.variant and fixing them is just not possible with the current design (dynamic operator dispatch). I'd literally have to rewrite the whole thing or use some extremely dirty hacks resulting in implementation defined behavior. I'd rather rewrite it, but not if someone's already done it.
Sounds like it's not a problem with std.variant specifically, but conditional attributes in general.
We'd need something like nothrow(condition) to make things work out nicely, I think.
| |||
August 31, 2012 Re: Is anyone working on a new std.variant? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Alex Rønne Petersen | On 8/31/12 4:55 AM, Alex Rønne Petersen wrote:
> Hi,
>
> See title. I recently came across a bunch of pure/nothrow issues with
> std.variant and fixing them is just not possible with the current design
> (dynamic operator dispatch). I'd literally have to rewrite the whole
> thing or use some extremely dirty hacks resulting in implementation
> defined behavior. I'd rather rewrite it, but not if someone's already
> done it.
There's some pent-up work on inference of pure and nothrow for template functions. Should such be of help?
Andrei
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply