3 ms·
I mean, no language wants to make their users unhappy, but it's about the priorities of the language designers. So for example, if you ask Rust's core team what
by steveklabnik 11y ago
I mean, no language wants to make their users unhappy, but it's about the priorities of the language designers. So for example, if you ask Rust's core team what we focus on, we say:
1. safety
2. speed
3. concurrency
If you ask Matz about Ruby, he says
> I hope to see Ruby help every programmer in the world to be productive,
> and to enjoy programming, and to be happy. That is the primary
> purpose of Ruby language.
https://www.youtube.com/watch?v=oEkJvvGEtB4 https://www.youtube.com/watch?v=oEkJvvGEtB4
As a good example of this, a lot of programmers are much happier with a GC than with manual memory management, or a Rust-like system. But Rust's core values mean that it can't have a GC, even though that might make some people happy.
- 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.