Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Can you elaborate on common misuses you see?


Do you mean just passing around values as key-value pairs in hashmaps instead of something meaningfully typed, or something else?


It sort of sounds like you want a ~yaml config that's unmarshaled to an object.


LMAO that's exactly the kind of pattern I'm ranting about. I don't know if you're being sarcastic or not.


I don't mean to a hashmap; I meant to a pojo/dataclass/whatever.


Sure 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.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: