Why D is annoying =P

Mehrdad wfunction at hotmail.com
Wed Oct 24 12:41:41 PDT 2012


On Wednesday, 24 October 2012 at 19:34:15 UTC, H. S. Teoh wrote:
> I don't know if there is any struct-specific problem here, but 
> AA comparison right now is horribly horribly broken (search on 
> the bug tracker for "AA" and you'll see a bunch of issues on 
> that end). You're incredibly lucky that two AA literals 
> actually compared equal. In some cases, not even that is 
> guaranteed.


Yeah, I was a little aware that AAs were semi-broken, but I 
thought, hey, if it seems to work then it obviously works.
Turns out that wasn't so true. :\



> I've tried to clean up the AA code but it's a tangled messy 
> ugly labyrinth with fragile hacks sprinkled in, and didn't get 
> to the point where it's ready to commit. One major obstacle is 
> that parts of it are implemented in compiler hacks, and part of 
> it is schizophrenically duplicated in object_.d, not 
> necessarily consistently, and it's just Not Nice in general. 
> That it works at all is reason enough to be thankful. I don't 
> expect things to be pretty once you start poking into the 
> intricacies of AA's, sad to say.



Yeah, the trouble is, none of the set-based data types (including 
maps) in D seem to be working...

- AAs are broken
- AssociativeArray is the same as above, I think?
- RedBlackTree is useless (how do I keep a "set of sets"?)
etc.


So you can't really write a real program in D, to put it blunty.


More information about the Digitalmars-d mailing list