Could we reserve void[T] for builtin set of T ?

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 1 05:45:23 PDT 2016


On Friday, April 01, 2016 19:26:46 Daniel Murphy via Digitalmars-d wrote:
> On 1/04/2016 6:24 AM, deadalnix wrote:
> > Pretty much as per title. I has that in the back of my mind for a while.
> > Would that work ?
>
> Don't forget that builtin AAs have been an epic disaster, and this would
> require an appalling amount of effort to implement in the compiler
> types, ctfe, druntime, new traits etc.
>
> Phobos seems like a better place - and while not quite as concise, the
> syntax should still be pretty intuitive.

Given that we already have built-in AA's, I like the idea of adding sets
like this, but it wouldn't surprise me at all if it were ultimately a bad
idea. Certainly, I agree that having AA's built into the language has turned
into a disaster even though it's theoretically very nice to have - and it
has turned out quite well for the basic use cases. It just falls apart
completely once you start caring about stuff like const and immutable and
anything complicated.

As it stands, if someone wants a set with Phobos, we have RedBlackTree in
std.container. So, we actually have sets already. But all of that will
presumably be getting an overhaul with what Andrei has been up to.

- Jonathan M Davis



More information about the Digitalmars-d mailing list