No dictionaries?
Correct me if I’m wrong, but Mojo doesn’t have dictionaries yet, does it?
9 Replies
No, it doesn't. I'm waiting too.
Congrats @drunkwcodes, you just advanced to level 4!
Hopefully it will be soon.
The community is attempting to implement some, but it'll probbably be a few days
and by the community i really mean me, and 2-3 other madlads
Dictionary update:
The dictionary is kinnda halted (ish) because, we don't have tuples, and we can't make tuples, cause we don't have traits.
We're still trying to figure something out, but it may be a little while longer than just "a few days"
https://www.digitalocean.com/community/tutorials/hash-table-in-c-plus-plus
Hash table seems not easy to implement, too.
I appreciate your works.
How To Implement a Sample Hash Table in C/C++ | DigitalOcean
Technical tutorials, Q&A, events — This is an inclusive place where developers can find or lend support and discover new ways to contribute to the community.
What do you need tuples for that structs can't do? In strict type systems tuples are just anonymous structs with unnamed fields.
I mean, we could do it without struct, but still without traits, we can't implement the
__EQ__
function (without using compiler arguments, which no one wants to do), and therefore we can't really scan through the dict and match a key to a valWhen will list be support?
Please have a look at https://github.com/TeamPuzel/mojo-list and tell me what you think after trying, thanks.
GitHub
GitHub - TeamPuzel/mojo-list: A reference counted list supporting i...
A reference counted list supporting iteration, map, filter, fold and a lot more. - GitHub - TeamPuzel/mojo-list: A reference counted list supporting iteration, map, filter, fold and a lot more.