hashed array?

monarch_dodra monarchdodra at gmail.com
Mon Nov 12 07:05:29 PST 2012


On Monday, 12 November 2012 at 14:53:19 UTC, Andrej Mitrovic 
wrote:
> On 11/12/12, monarch_dodra <monarchdodra at gmail.com> wrote:
>> I've noticed though it has no built-in "hashed container" for
>> when you just need to store unique elements, but without any
>> specific data associated (lists of names, for example).
>
> You probably mean a Set? I think we could really use some syntax
> support for sets. Otherwise people use workarounds like "alias
> void[0][string] StringSet", and wrap such a type in a struct 
> with
> operator overloads to emulate the built-in hash syntax.

Well "set" is just a name by convention. In C++, set's complexity 
restrictions forces the binary tree implementation on it.


More information about the Digitalmars-d mailing list