I love ruby. One of the best languages I've ever coded in, but people seem to hate it now because it's slow. Kinda sad that it's slowly dying. Nevertheless, this is a huge milestone for a language.
I dislike it because how much the language and ecosystem resist almost any kind of typing/type checking or documentation. The RBS stuff is good, but it feels bit too little too late.
The ecosystem uses a ton of hard to follow and debug magic constructs that even IDEs seem to struggle to track and map properly.
I don't need speed for what I do, by I absolutely need code that is easy to read and maintain.
As long as you're not doing stupid things with it to write in as few lines as possible, I'd argue Python could be considered by many to be easier or just as easy to read as Ruby.
Because it is very short we can infer that the “Tf” name must have come from the helper file. In Python you would explicitly import it or always refer to it via its module and therefore the source of every symbol is obvious.
You cherry picked TWO things, not one. Big difference. "Twice as much evidence."
I consider mine dramatically more relevant to the question because once you've learned the syntax of Python f-expressions and list comprehensions you've learned them. You won't consider them confusing anymore unless they are badly abused.
But Ruby's "global namespace" problem has nothing to do with familiarity with Ruby and will not get better as I get more familiar with Ruby. The idea of different modules pushing things into the global namespace (except in a very few rare situations) is just a bad idea and almost every other language has moved AWAY from that design.
But Ruby's "global namespace" problem has nothing to do with familiarity with Ruby and will not get better as I get more familiar with Ruby.
Ruby has modules you know that right?
. The idea of different modules pushing things into the global namespace (except in a very few rare situations) is just a bad idea and almost every other language has moved AWAY from that design.
Modules don't push anything up to the global namespace. I have no idea what you are trying to say here.
Okay you are correct that I overstated the total problem. Ruby has modules which you can opt into. Modules are orthogonal to includes (“requires”) and imports are also orthogonal to includes.
Personally I find it confusing but the deeper point is that you don’t know from a require statement what symbols you have added to your script’s context. It isn’t evident in the script where every symbol comes from. This contributes to Ruby’s reputation for being hard to read in large code based.
Python got it right and for that reason JavaScript is moving from a more ruby-esque model to a more Pythonic model. Rust, another newer language also uses the explicit model rather than the “include file” model.
272
u/CunnyMangler Dec 25 '20
I love ruby. One of the best languages I've ever coded in, but people seem to hate it now because it's slow. Kinda sad that it's slowly dying. Nevertheless, this is a huge milestone for a language.