2 ms·
> a lot of programmers are much happier with a GC than with manual memory management I don't disagree. I'm happier when I don't have to worry about irrelevant
by catnaroek 11y ago
> a lot of programmers are much happier with a GC than with manual memory management
I don't disagree. I'm happier when I don't have to worry about irrelevant things, like manual memory management. And of course I'm happier when I can achieve more results with less effort, like when there is a libary or framework that does what I need. This is only natural.
But not everything about Ruby is a happiness or productivity booster:
(0) Ruby doesn't lend itself to writing code that documents its own structure very well, which is a time sink when the code changes faster than your ability to document the changes. [No, tests aren't documentation. At best, they only document your intentions, not the actual code.]
(1) Ruby makes it unnecessarily difficult to perform basic sanity checks, like ensuring that you haven't forgotten any `when` branches in a `case` statement. The smallest testable unit is a method. Try unit-testing a loop invariant.
(2) As if the above technical deficiency weren't enough, culturally, Ruby pushes towards more cumbersome forms of testing [behavior-driven development], rather than less [property-based testing].
Note that none of these disadvantages has anything to do with the fact Ruby uses a garbage collector.