No dictionaries?

Correct me if I’m wrong, but Mojo doesn’t have dictionaries yet, does it?
9 Replies
drunkwcodes
drunkwcodes15mo ago
No, it doesn't. I'm waiting too.
ModularBot
ModularBot15mo ago
Congrats @drunkwcodes, you just advanced to level 4!
Mahmoud Hussein
Mahmoud HusseinOP15mo ago
Hopefully it will be soon.
lynet_101
lynet_10115mo ago
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"
drunkwcodes
drunkwcodes15mo ago
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.
bowlerman
bowlerman15mo ago
What do you need tuples for that structs can't do? In strict type systems tuples are just anonymous structs with unnamed fields.
lynet_101
lynet_10115mo ago
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 val
supra
supra15mo ago
When will list be support?
drunkwcodes
drunkwcodes15mo ago
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.
Want results from more Discord servers?
Add your server