27 ms·
Ruby might be marginally better for toy examples, but goddam I just finished working a job in a Ruby monolith that had ~1M loc and hundreds of developers and it
by bloppe 2y ago
Ruby might be marginally better for toy examples, but goddam I just finished working a job in a Ruby monolith that had ~1M loc and hundreds of developers and it was a nightmare far worse than Python and reading this article made me feel like venting.
Python's "there should be 1 obvious solution to any problem" culture is way better at scale than Ruby's "there should be 5 subtly different solutions to every problem". I hate the distinction between blocks, procs, and lambdas. Ruby's support for both `...` and `..` likewise does more harm than good. That extra period can be easy to miss while scanning code and we all know how much more important readability is than writability. I also don't like the difficulty to distinguish "magic" references from real ones, unlike in Python where all the magic references have double underscores. It once took me a half hour just to figure out why this seemingly normal method called `method_missing` was being invoked when it seemed like it shouldn't (this codebase was so large and classes had so many ancestors / mixins that finding method definitions was generally a problem. I also don't like mixins btw, or inheritance for that matter, but having 1 is better than having both).
I would discourage anybody from learning Ruby for the simple reason that large Ruby codebases are a scourge to our profession. Small Ruby codebases may be fine, and large Python codebases aren't great either, but I much prefer the language that minimizes all the weird gotchas.
- codesnik 2y agoI wonder in which language you think 1m locs would be manageable for an actual monolith (and not just a monorepo). And method_missing is a such fundamental part of the language, that it obvious you skipped basic docs on the language. Besides that, there're not many "magic references". Unlike in python, btw, where "there should be 1 obvious solution to any problem" mantra doesn't hold for a veeery long time.
- SAI_Peregrinus 2y agoC works pretty well. Linux is somewhere upwards of 20M LOC, and it's famously a monolith!
- bloppe 2y agoYa I'd say the key is lexical scoping and strong typing. C has those. Python and Ruby have neither.
- Lio 2y agoPerhaps you mean statically typed? i.e. type checked at compile time. C is generally not considered to be strongly typed but Ruby is. i.e. types aren't automatically coerced at runtime in Ruby.