Prothon Prototypes vs Python Classes

Michael mogmios at mlug.missouri.edu
Sat Mar 27 21:17:15 EST 2004


I'm not terribly familiar with the concept of prototypes although I 
believe I understand the basic meaning and I have worked in languages 
which do use prototypes (although not called that).

Aren't there many times when it is usefult to work with classes where 
you do not want an instance to exist? Such as multiple level of 
subclasses where code is kept easily readable by putting it on a the 
appropiate class for that function alone. Often useful when you'll be 
using many similar but not identical objects? I can see how it'd be 
useful to be able to define new methods on an object, or edit the 
methods on an object but I can not see the purpose to removing classes 
altogether. Am I correct in my impression that with prototyping you must 
instantate an object to define it's structure? That would seem wasteful 
and cluttering of the namespace. Also he way your prototypes read appear 
less clear to me than a class definition. I fear that you'd wind up with 
people creating an object.. coding random stuff.. adding a method to 
that  object.. coding more random stuff.. and then adding more to the 
object.




More information about the Python-list mailing list