Prototype-based programming
Hung Jung Lu
hungjunglu at yahoo.com
Wed Dec 10 19:37:15 EST 2003
More information about the Python-list mailing list
Wed Dec 10 19:37:15 EST 2003
- Previous message (by thread): Prototype-based programming
- Next message (by thread): Prototype-based programming
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, Description of PBP (Prototype-based programming) can be found at: http://en.wikipedia.org/wiki/Prototype_based http://www.dekorte.com/Proto/Chart.html ("Self" is an example of a PBP language: http://research.sun.com/self/language.html) The most naive PBP would imply a overwhelming redundancy in namespace entries. (E.g: all object instances carry bindings for their methods.) Efficient in time, but not very efficient in space (memory usage). But I am sure people have looked at lookup-precedence strategies, much like how Python finds names first in the local, then the global, then the built-in namespace, or how instance attributes are looked up in multiple inheritance. I got looking into PBP because Python starts to look evil when you use descriptors, metaclasses, etc. And that's not just Python: the fundamentals of most well-known languages are getting more and more complicated. The current programming world reminds me of the situation of the time when RISC came up against CISC. I mean, it's OK for a lot of additional features to be built on top of the fundamentals, but nowadays the fundamentals themselves are getting too complicated. Is it time to take a break and say: "there is gotta be a simpler way!"? >From the little I read about Haskell it seems that it's possible to keep the fundamentals clean and do complex things at the same time. The usage of classes is just weird... it's a concept from the 1970s and should probably be retired by now. Because you use classes, you then hit upon metaclasses, (and meta-metaclasses... ad-infinitum), and also come up with funny "patterns" like Singletons, or define "static" class attributes. I mean, aren't all these the symptoms that we are doing something wrong? regards, Hung Jung
- Previous message (by thread): Prototype-based programming
- Next message (by thread): Prototype-based programming
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list