|
|
|
|
|
by nopenopenopeno
1608 days ago
|
|
>when you only need to write two curly braces to create a “dictionary” (of course behind the scenes this is a hash table) many of the nuances of that data structure are hidden from you. You have no idea that accesses are on average O(1) but worst case are O(n). Well, that is wrong. Single value accesses are O(1) amortized. Also, Java is a lower level language but I don’t think simply programming in Java instead teaches you this. Either way, it’s the difference between learning how to write programs and learning computer science. |
|
I suppose that’s also fair. I would say that Java at least makes you aware that there is magic afoot. You have to explicitly write that you’d like to use a HashMap, at which point someone writing or reading the code might wonder “what’s that?” Instead, python hides behind the abstraction of a “dictionary” when it should be in my opinion broadcasted from the high heavens that this is a hash map in disguise.
As far as the remainder of your comment, I agree wholeheartedly. Learn computer science. It makes you a better programmer.