
clap with Ed Page
Rustacean Station
Clap - Is There a Way to Use Hash Maps in Python?
In python, your objects are all just hash maps internally. While in rust, you have you define a struct and as all your fields, they're all statically defined. With the way clap has grown its feature set, with the fact that everything has to be baked into clap to be able to work, we now have 20, 30 fields in a struct. And that means any time you move that struct, it has to generate all the assembly code for moving 20 30 fields. So by using any map for a lot of the different kinds of state you might want to track with an argument, we can be able to reduce our compile times, reduce our binary size and increase flexibility.
00:00
Transcript
Play full episode
Remember Everything You Learn from Podcasts
Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.