4 ms·
Disclaimer: This is very subjective and from a Python guy 1. While Python and Ruby are roughly of the same age, Ruby was only popular in Asia before Rails. At
by beza1e1 14y ago
Disclaimer: This is very subjective and from a Python guy
1. While Python and Ruby are roughly of the same age, Ruby was only popular in Asia before Rails. At that point Python already had a solid base of non-web stuff.
2. Ruby feels more wild and crazy to me. Is monkey-patching still considered cool in the Ruby community? As a Pythonista I try to avoid such confusing stunts.
Due to both of those reasons I believe Python has more solid libraries. For example, Rails was extracted from a small productivity app, while Django was extracted from a serious newspaper website. While Ruby was fixing memory leaks, the Python interpreter was speeding up its hash map.
As a language enthusiast I envy Ruby for the blocks. As a Python programmer I never felt the need for them.
- Wilduck 14y ago> As a language enthusiast I envy Ruby for the blocks. As a Python programmer I never felt the need for them. I think one of the reason why Python isn't hurt by the lack of blocks is the difference in namespacing rules. Since defining a top level function doesn't pollute the global namespace, there's much less of a need for blocks and mulit-line lambdas. If I feel that I've got too many functions sitting around in one of my project's files, I can simply open up a new file, utils.py, and all my utility functions will be in their own namespace. So, I agree, blocks are cool, but when it comes to re-reading code, I like that I've been forced to spend the extra few seconds to give my functions names.
- kaonashi 14y ago>Is monkey-patching still considered cool in the Ruby community? It can be useful in your particular project to overcome library incompatibilities, but it probably shouldn't be used in library/framework code.