4 ms·
I think there's always been a bit of 'grass is greener' sentiment between the Python and Ruby communities. As a Python guy I do appreciate the look of Ruby code
by drpancake 16y ago
I think there's always been a bit of 'grass is greener' sentiment between the Python and Ruby communities. As a Python guy I do appreciate the look of Ruby code.
However for sheer pragmatism Python wins; almost every API and library you can think of has its own Python bindings.
- steveklabnik 16y ago> However for sheer pragmatism Python wins; almost every API and library you can think of has its own Python bindings. This is largely true for Ruby too. Both have great C FFIs, so it's not hard to write these kinds of wrappers. I've never been wanting. I don't think you can really call this a general win for either language, though Ruby does tend to lose out to NumPy and SciPy (from what I hear).
- endtime 16y agoHmm, not for me. I think things like paren-free function calls are awful for readability and array.select &:even? is far, far less clear to me than filter(even, array) Ruby just seems to have tons of unnecessary syntax, I guess.
- zya 16y agoA lot of 'unnecessary' syntax is comming from the fact that block forms 'do..end, {}' are not objects in Ruby. I wish Ruby implemented them the same way as in Smalltalk, to be used as objects passed to a method's arguments. All the 'do..end, {}', '&', 'yield', block_given?, etc. would have been gone. And there would be just one unified way to construct and call a block. This is the only part of the language I find wrong in Ruby. Any Rubyists share the same feeling?
- chc 16y agoYes. I have a feeling it's not even an uncommon sentiment among Rubyists. Ruby's implementation of blocks was a huge chunk of technical debt that it incurred early on when it kind of wanted to be Perl, and all the attempts to patch it up while maintaining backwards compatibility have made it a hugely complex corner of the language. Ruby would be vastly less confusing if they threw out all the current syntax and semantics of blocks, straight-up aped Smalltalk's, and unified them with methods.