3 ms·
Hash maps. Everyone just turns their brains off and uses hash maps for everything. The code this creates is awful for users, awful for people consuming it, awfu
by msgodel 1y ago
Hash maps. Everyone just turns their brains off and uses hash maps for everything. The code this creates is awful for users, awful for people consuming it, awful for people maintaining it.
Think for five minutes about your abstraction and create meaningful types and config languages, don't just hack it with a hashmap.
- Zambyte 1y agoCan you elaborate on common misuses you see?
- dehrmann 1y agoIt sort of sounds like you want a ~yaml config that's unmarshaled to an object.
- msgodel 1y agoLMAO that's exactly the kind of pattern I'm ranting about. I don't know if you're being sarcastic or not.
- dehrmann 1y agoI don't mean to a hashmap; I meant to a pojo/dataclass/whatever.
- msgodel 1y agoSure but it's the overly general hashmap based interfaces everywhere which includes these canned serialization formats that's the issue. Someone else in this thread posted noyaml.com which is a great summary of the issue there.
- catlover76 1y ago[dead]
- xboxnolifes 1y agoDo you mean just passing around values as key-value pairs in hashmaps instead of something meaningfully typed, or something else?