4 ms·
Ruby embraces and favors magic. Python shuns magic and goes for one correct and explicit way. The languages are pretty similar. The community attitudes are dif
by nine_k 9y ago
Ruby embraces and favors magic. Python shuns magic and goes for one correct and explicit way.
The languages are pretty similar. The community attitudes are different.
- sayelt 9y ago> Ruby embraces and favors magic. Python shuns magic and goes for one correct and explicit way. Could you please give examples of this? I never understood where this idea comes from.
- setpatchaddress 9y agoThe languages are not very similar. What gives you that idea?
- zubat 9y agoDynamic types, OO with some extension for functional style, inherited Algol syntax with some homegrown innovations, batteries-included design. Where they differ, it's largely in whether they bend towards consistent style(Python) or more late-binding power(Ruby).
- rurban 9y agoCannot agree. Ruby loves its MOP, python loves its method overloads. Both are highly magic, but a MOP is technically superior to overloads, because you just flip the vtables and don't have to look at every single method call, if some python programmer decided to overload it. Perl has no builtin MOP, and even worse overloads than python.
- kudokatz 9y agobut the ruby community takes modules to magic extremes. Just take the overload of include vs. extend as one example. Some modules don't even have any reasonable error messages or try to detect when someone stomps on their names or data. It's a madhouse with ruby modules that try to be "magic" or "easy", which is never "simple". If you ever find yourself pulling back the curtain of many ruby modules, it's time to dig in and swear as you go.