objeck / objeck-lang

Objeck is a modern object-oriented programming language with functional features tailored for machine learning. It emphasizes expression, simplicity, portability, and scalability. The programming environment consists of a compiler, virtual machine, REPL shell, and command line debugger with IDE plugins.
https://objeck.org
Other
154 stars 11 forks source link

Please add unordered map #451

Closed ghost closed 7 months ago

ghost commented 7 months ago

Collection.UnorderedMap, Collection.UnorderedMultiMap, and Collection.UnorderedHash?

C++ offers both ordered and unordered map.

objeck commented 7 months ago

In C++, an unordered unordered_map is a hash. A sorted tree structure backs a map.

ghost commented 7 months ago

In C++, an unordered unordered_map is a hash. A sorted tree structure backs a map.

Perhaps I shouldn't mention C++. I'm not talking about the C++ specific std::unordered_map data type. Put C++ aside. My idea is, if there is ordered maps, there should be unordered maps, too. Should Objeck have unordered maps? Languages usually offer both. At least, this is what I read about Java and C#.