3 ms·
I guess you could argue that Python is a prototype language deep down because it performs property lookups at runtime by following a chain of objects. (Those ob
by olavk 15y ago
I guess you could argue that Python is a prototype language deep down because it performs property lookups at runtime by following a chain of objects. (Those objects just happen to be classes.) But by that definition, other dynamic OO languages like Perl or Ruby is also prototype languages.
If you think of classes in Python as a feature build on top of prototypal inheritance, then it has certainly proved a very useful feature.
- DmitrySoshnikov 15y agoExactly, Python is a "prototype-based" language with first-class classes as sugar; similar to Coffee. I gave a link below where kinds of classes are described.
- SeanLuke 15y agoMy understanding is that, unlike Python and JavaScript, Ruby has a true class-based OO system. Can't speak to Perl.
- olavk 15y agoThat is interesting, I don't know Ruby that well. But by what definition is Python not a "true" class based OO-system?