3 ms·
Ruby gets the basics of object oriented programming right. You should not have different syntax for different object types. In Perl, even for things like assign
by lacker 18y ago
Ruby gets the basics of object oriented programming right. You should not have different syntax for different object types. In Perl, even for things like assigning to a variable or passing an argument to a function you need to know the types. It is nearly impossible to replace a list or a hash table for another datatype later. Ruby gets the simple stuff like this right.
- timr 18y agoRuby's way of doing things is not necessarily "right". It's different. In particular, if your fundamental types are fundamentally different, there's a strong argument that they should have different interfaces. Object-oriented programming does not require that all types be polymorphic, and pretending that they are is a source of confusion.