Summary: Built-in "set" type similar to associative arrays
           Product: D
           Version: 2.030
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from Justin Spahr-Summers <> 
2010-03-08 03:03:42 CST ---
It's rather low priority, but it'd be nice to have built-in set functionality
(here meaning an unordered data structure where no duplicate values can exist).
Associative arrays can already fill the role to some extent if you just opt not
to use the values at all, but that's a waste of storage.

Syntax could even be similar, using "void" in place of a value type:

void main () {
    void[string] set;

    assert("hello" in set);

    assert(!("hello" in set));

If creating a new property ("add") is out of the question, even something
    set["hello"] = true;
could work.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to