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

You can't --really-- avoid dictionaries in python, as namespaces and classes actually are dictionaries, and can be treated as such.

In Lua, all global variables are inserted into the global dictionary _G, which is accessible at runtime. This means you can't even write a simple program consisting of only functions becouse they are all added and exectued from that global dictionary.

There where also other languages which could have been mentioned. In Javascript for instance, functions and arrays are actually just special objects/dictionaries. You can call .length on a function, you can add functions to the prototype of Array.



Those are just implementation details. They're not really relevant to the way your program is constructed or the way you reason about it.




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

Search: