(no title)
kmarc | 3 months ago
I hoped that ruby4 maybe implements stuff that python has, like type annotations or making the damn parens mandatory, but no. Not surprised that python has ten times more developers according to stackoverflow's survey... I can't possibly imagine a collaborative project where other people also have to work on the same code base, and not having any clue what a symbol under the cursor might be.
No type hints. No mandatory requires. No parens, so never know if something is a method or, callable, or variable. Basically IRB is a must for development, because in the editor, I'm blind.
And the ecosystem is just sad. Swagger-rails libraries out there are rookie jokes compared to what python has. At least there is decent GRPC / protobuf integration, so all new services I am writing can be in python. Or any sane language.
dalenw|3 months ago
phantasmish|3 months ago
Implicit imports (“… which package defined this symbol? Who knows!”), dynamic definitions all over the place (“where’s this defined? Literally nowhere until the program runs!”), all that stuff. It’s awful. I feel blind not being able to answer basic questions about a codebase with grep. And that’s not even considering the lack of static typing.
arp242|3 months ago
haolez|3 months ago
dragonwriter|3 months ago
Ruby has had type annotations and typecheckers for quite a while. Unfortunately (IMO) the annotations are not inlinine.
> or making the damn parens mandatory, but no.
A linter/formatter can give the effect of that (and tune it for where it is appropraite) whether or not the language has it, though there are good reasons Ruby does not in general.
> No parens, so never know if something is a method or, callable, or variable.
Method and local variable are the only possibilities (callables are either the value of local variables or the return value of method calls),
pkkm|3 months ago
Another thing I don't like about Ruby is how much the community has embraced the Clean Code brand of readability snake oil. It's easy to come by the opinion that any function over 5 lines is a code smell and over 10 lines it's outright bad. I've even heard the view that if-else statements are a code smell and I should always try to replace them with different classes that have the same interface. To be fair, that only happened twice, but that's two more times than I've heard it from users of any other language. I think that the Python community usually strikes a better balance between avoiding excessive function/class length and avoiding excessive indirection.
throwaway48921|3 months ago
This also puts me off every time, and I've dealt with people who embrace this a lot as a Ruby programmer. Fortunately, you can ignore them and still enjoy writing Ruby code the way you want.
kmarc|3 months ago
The forced if/else transformations drive me nuts.
wiseowise|3 months ago
arp242|3 months ago
jazzyjackson|3 months ago
chihuahua|3 months ago
The 4.0.0 release notes (TFA) are like a joke. Here are the language changes in their entirety:
Language changes: *nil no longer calls nil.to_a
That's it.
zem|3 months ago
phantasmish|3 months ago
I really like a few of its smaller libraries. Just not Rails.