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

           Summary: Provide an intutive way to clear all entries in
                    Associative Array
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: pun...@coverify.org


--- Comment #0 from Puneet Goel <pun...@coverify.org> 2012-07-09 06:22:08 PDT 
---
Deleting all the entries from an associative array is not intuitive. This has
been discussed at the D forum here:
http://forum.dlang.org/thread/iu3ll6$2d48$1...@digitalmars.com

I suggest the following syntax should work

int[string] aa;
aa["foo"] = 1;
aa = []; // clear all array entries


At this point only this works. I think this is not very intuitive.

int[string] aa;
int[string] empty;

aa["foo"] = 1;
aa = empty;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to