|
|
|
|
|
by richcollins
5922 days ago
|
|
Ruby Classes don't provide a contract either. You can add and remove methods to your heart's desire. information hiding is the principle of segregation of design decisions in a computer program that are most likely to change, thus protecting other parts of the program from extensive modification if the design decision is changed http://en.wikipedia.org/wiki/Information_hiding How are prototypes inferior to classes with respect to information hiding? They provide the ability to easily change the implementation while maintaining the interface. How do prototypes inhibit polymorphism? All of the prototype languages that I know of (Javascript, Io, Self, Lua ...) make it easy to take advantage of polymorphism. |
|