View mode: basic / threaded / horizontal-split · Log in · Help
March 04, 2013
Issue 3825 and 3789
A bit of celebration is in order because step by step D is 
becoming usable :-)
DMD 2.063 will have a significant improvement, this bug seems now 
fixed:

http://d.puremagic.com/issues/show_bug.cgi?id=3825


This program:


import std.stdio;
void main() {
    string[] words = ["how", "are", "you", "are"];

    int[string] aa1;
    foreach (w; words)
        aa1[w] = (w in aa1) ? (aa1[w] + 1) : 2;
    writeln(aa1);

    int[string] aa2;
    foreach (w; words)
        if (w in aa2)
            aa2[w]++;
        else
            aa2[w] = 2;
    writeln(aa2);


Used to write:
["how":1, "you":1, "are":2]
["how":2, "you":2, "are":3]

Now it writes:
["how":2, "are":3, "you":2]
["how":2, "are":3, "you":2]

This bug fix removes a big trap of D AAs.

---------------

Currently this is near the top of my wish list of bugs:
"Structs members that require non-bitwise comparison not 
correctly compared":

http://d.puremagic.com/issues/show_bug.cgi?id=3789

Fixing 3789 will remove another significant class of bugs from D 
programs.

Bye,
bearophile
March 04, 2013
Re: Issue 3825 and 3789
I remember you were talking about "D top bug" list (15 or 10).  
Can you tell the whole list?
March 04, 2013
Re: Issue 3825 and 3789
Maxim Fomin:

> I remember you were talking about "D top bug" list (15 or 10).  
> Can you tell the whole list?

I think different persons have different priorities. (And 
generally it's not a good idea to show lists of not easy & open 
problems. It's better to face them one at a time).

Bye,
bearophile
Top | Discussion index | About this forum | D home