2 ms·
Map/Filter/Collect/Reduce, all built on generics make code much more readable than their Go counterparts. I can make a frequency map simply by drain and collect
by jkelleyrtp 5y ago
Map/Filter/Collect/Reduce, all built on generics make code much more readable than their Go counterparts. I can make a frequency map simply by drain and collecting a vec into a hashmap - maybe 4 lines of code.
The density comes from being able to share common functionality behind generic interfaces, so I don’t have to reinvent the wheel for every new project.
I find that most projects I make look the same internally, unless I start pulling some “clever” optimizations like custom allocators or self-referential structs.