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
