2 ms·
Funny that. If you use OO for everything in Smalltalk, often it's pretty. If you use OO for everything in, say, Perl 5, it feels quite cumbersome to me. (Eve
by stcredzero 18y ago
Funny that. If you use OO for everything in Smalltalk, often it's pretty. If you use OO for everything in, say, Perl 5, it feels quite cumbersome to me. (Ever meet one of those guys who uses one instance of polymorphism in their whole project and talks as if they've mastered OO?)
Look inside the Smalltalk image sometime. There is a clear attempt at OO everywhere for everything and it feels natural and unforced. (Well, it's about 70%, to be completely accurate, because there's also some functional and some OO newbie code in there.)
"proper" is all about cost/benefit tradeoffs, and it's very context-dependent. Expressing things polymorphically in an environment like Smalltalk, Python, or Ruby has low coding overhead.
Sometimes, it is just better to crank out an old-fashioned procedural routine and be done with it.
One of the key tradeoffs: Am I trapped, or will I be able to change my mind? So long as you can keep yourself from getting trapped, you're mostly safe.