dict literals :(
Although I read there are crates to help with this, and it's indicative of bad programming styles...
Although I read there are crates to help with this, and it's indicative of bad programming styles...
In Rust that's not really an option because the types are so much stricter, and the loss of certainty on the other side makes things less convenient. Instead you'd use a tuple or throw a quick struct together (tuple or not). Defining structs is so habitual that it doesn't really feel unnatural or heavyweight.
It's like using dataclasses in Python, except the language also becomes helpful when you do that.