Other languages fit hardware or chosen domains better or worse, those are the reasons why you'd choose one or the other. Ruby's the only language that fits the mind better.
Other languages fit hardware or chosen domains better or worse, those are the reasons why you'd choose one or the other. Ruby's the only language that fits the mind better.
Look, I really like Ruby, too, but the idea that it is the one language that “fits the mind better” and is, for that reason, immune to the normal ebb and flow of language popularity is both amazingly parochial in the first case and empirically false in the last case.
Well after awhile I realized I didn't miss Scheme. Like, at all. I had to really think hard about why. The first insight I had was that, well, syntax really does matter, and the paren-soup just isn't aesthetic.
The second thing I realized was that Ruby's object model is just far more intuitive than any other way of dealing with objects. It's just, well, elegant. Everything's an object, everything has a class. This is what Crystal misses. And it can't because of its static nature, types can't be a class. A certain kind of reflection is impossible.
And this is where static vs. dynamic comes in. Static forces you to write boilerplate. Dynamic lets you write it when you need it. You want dynamic until you want static. It's just that simple. No one is inherently better, they're just better suited to different situations. You want to flow from one to the other, not get handcuffed. This makes dynamic inherently better, because you can build a static type checker on top of a dynamic language, but to put dynamic typing inside a static language is just always going to be a kludge.
If I can get pleasing syntax, an elegant object model, and gradual typing in a language that's also faster than Ruby, I'd jump on it. But every other language makes compromises on these points for one reason or another. Of all three, it seems the object model is the most difficult to implement, but it's one I rely on to get me out of jams. I don't often need metaprogramming, but when I do, it saves me a lot of time. And I've never run into anything else like it save in the Lisps.
If I didn't have Ruby, I'd be using a Lisp. Having metaprogramming available, even if you're not using it, gives a real sense of safety, not against silly bugs, but against the much bigger possibility, of making poor abstractions. In Ruby, once I've realized I've made a bad abstraction, I can take the working code and metaprogram it, keeping behavior working, until it's using the semantics I need from it. This makes me far more confident to just knock up systems as quickly as possible, safe in the understanding that I can turn any semantics into any other semantics when I need to. You can fix the propensity to make type errors in a dynamic language with discipline, but you can't fix the propensity to make wrong abstractions with any amount or kind of discipline that I've ever been able to see.
But I'm also surprised just how much syntax impacts my desire to actually write code. There's something about Ruby's code block delimiters that are more pleasing than either whitespace or bracket delimiters. I don't mind bracket delimiters if the whole block is on one line. But to force me to use brackets for multi-line code blocks, the so-called C syntax, well I don't find it half as aesthetically pleasing as Ruby. Is it just personal preference? Perhaps. But I think a hundred years is going to really clarify everything and languages will lose their utility advantages over each other and so all that's left will be aesthetics. And I think Ruby just has everybody beat in this area.
Also:
> Static forces you to write boilerplate.
Not very much, inherently, just most static languages have poor (or no) inference, which forces you to write boilerplate (and often poor type systems, which make some otherwise correct approaches impossible, forcing you to code around the type system on top of writing boilerplate.)
Haskell is kind of eye opening in this regard, in terms of a statically tired language where these problems are minimized compared to most popular static languages.
I do professional work in Ruby currently, but Crystal is just so much more pleasant to work with.
Python, C++, C, Java and javascript are the languages with staying power that came and never went. If you were in the industry that long you'd know that most of the languages I mentioned have serious issues and problems and that the languages staying power has nothing to do with how they fit the "mind" or how good they are.
If you weren't a beginner you'd also note that ruby, like python and like javascript has serious issues when it comes to writing long lasting, reliable code. To code something as reliable and complex as an operating system in ruby would lead to huge amounts of technical debt. As a ruby or python code base grows in complexity it becomes more and more unmaintainable... It would be a mistake to write super complex systems in python or ruby because such systems benefit highly from type checking. Your comments indicate to me that it doesn't matter how long you've been programming... you lack the experience to understand this concept. Ruby is better for scripting then it is for writing applications.
What I have learned over the years is that programming is more about combatting our own faulty human nature, our own propensity to make mistakes. Ironically, the more expressive a language is, the more it gives, us the opportunity to express this fault. Power comes from restriction. Type checking is one such restriction.
We're both super biased in that regard; everyone has a language they prefer to think in. Usually a dynamic, malleable one.
Who thought perl would die?
That said, I'm going to agree with sibling comments and give Python one big, big, advantage over Ruby: it's made inroads into a ton more domains such as numerical computing, duct tape programming, bioinformatics, ml/ai etc. It's installed by default in nearly every *nix flavor, mac OS included.
My own shop has recently made the decision to replatform onto Node, for no real reason that I can discover. Just seemed to be a "oh let's all go learn the new hotness over here and toss away our existing architecture in order to do it. When something I wanted I found out was unmaintained in Ruby, I almost went along whole-heartedly with this new direction. But I've found something even more fundamental that's unmaintained in Node that's got me back in the "just use Ruby, it works and I know it really well" camp.
Faddish behavior on the parts of developers doesn't really concern me. I was never concerned that all my RDBMS knowledge would get tossed into the shitter when Mongo hit the scene. A steady decline doesn't bother me. COBOL has been declining for 30 years, and you can still make a fine living supporting COBOL codebases.
No, devs can do whatever they want, there's always going to be that pragmatic group of engineers that will use Ruby because it's still the best at what it does.
So if Ruby is "on a steady decline" someone forgot to tell my customers and employers.
This idea of languages "dying" to me indicates bubbles of your own - if there's one thing we've seen over most of the history of software it is that programming languages have remained incredibly persistent for decades even after they stop being used in new development, and we're certainly nowhere near that point for Ruby.
COBOL programmers are in hot demand because there are so few left that even the few positions where they are needed outnumbers them.
Look at objective numbers on language popularity, job boards, etc... You'll see that Ruby has pretty much vanished.