7 ms·
Stuffing data into dictionaries and passing it along many functions is much easier than writing a class to deal with the same.
by RandomWorker 4y ago
Stuffing data into dictionaries and passing it along many functions is much easier than writing a class to deal with the same.
- return_to_monke 4y agohard disagree. Mistyped a name? with classes you get an error on compile time. Dictionaries? only on runtime. plus, you won't need to remember every field because your editor can autocomplete it for you
- klohto 4y agoThere is more than one language out there
- LadyCailin 4y ago“Type safe dictionary” is just another way of saying “object”
- gnad_sucks 4y agoNo it's not. Dictionaries are accessed by key whereas objects are accessed by field (which is a high level way of representing an offset in memory). So one of those two is at least 10x faster than the other.
- return_to_monke 4y agoplease show a language whose HashMap type does compile-time checking. I am actually interested.