|
|
|
|
|
by antod
3637 days ago
|
|
> There isn't much you're missing. About the only use-case I can think of where Ruby has a clear advantage is in creating a DSL. But whether or not creating a DSL is a good idea or not is a whole nuther question. I find that there is a cost to all the Ruby features that make DSLs easy. If I may make some sweeping and possibly trite generalisations between the Python and Ruby communities...
Ruby fans value the happiness of the programmer writing new code, while Python fans value the happiness of the programmer having to read or debug someone elses code. Typical Ruby projects often go to great lengths to provide an elegant API even if it makes the internal implementation more complex. Typical Python projects seem to prefer clearer simpler implementations at the expense of a slightly clunkier (compared to Ruby at least) API. I don't know if Pythons "consenting adults" attitude about not hiding internal details contributes to this. eg private methods are a language feature in Ruby (and most other languages), but just a non functional naming convention in Python. There's probably also something to do with Rails being a formative philosophy for a lot of Ruby coders. Ruby coders from outside the Rails world often seem value more explicit code with less desire for complex 'magic'. |
|