Very good points. A codebase that gets this VERY wrong is Gitlab. I think it might be a dumb characteristic of Ruby programs, but they generate identifiers all over the place. I once had to literally give up following some code because I could not find what it was calling anywhere. Insanity.
Another point: don’t use - in names. Eventually you’ll have to write them down in a programming language, at which point you have to change the name. CSS made this mistake. foo-bar in CSS maps to fooBar in Javascript. Rust also made this mistake with crate names. A crate called foo-bar magically becomes foo_bar in Rust code.
I haven’t heard that in 15 years. The main reason to use Ruby is that it’s a better Python. The tooling is 10x better, it has all the same language features and more, it has easily enough packages to handle any situation you want, and it doesn’t have all the bike shedding that Python has.
You shouldn’t be writing applications in a scripting language anyway. They’re for scripting, it’s in the name.
Well I’m no fan of Python either but it doesn’t describe itself as a scripting language (and neither does Ruby) so I think you’re way off there.
And I dunno about Ruby being a better Python. It looks way worse to me. In particular the story for static type annotation seems pretty dire. The syntax is worse, it’s less popular, and even slower!
I can believe the tooling is better though. Python’s is abysmal (unless they officially adopt uv - ray of hope there but I have zero faith the Python Devs would make such an obvious decision).
Ruby on Rails is the worst thing to ever happen to Ruby. The language is great, much better than Python from a tooling perspective. And then Rails came along and ruined everything. I sincerely believe that the reason Python won out is solely because of Rails, because Ruby is better in every other regard.
Yeah, translating between cases isn’t exactly a problem IME. Might be neat to have a case-aware grep though, so you can get kebab-case, snake_case, camelCase and PascalCase all done in one go.
Very good points. A codebase that gets this VERY wrong is Gitlab. I think it might be a dumb characteristic of Ruby programs, but they generate identifiers all over the place. I once had to literally give up following some code because I could not find what it was calling anywhere. Insanity.
Another point: don’t use
-
in names. Eventually you’ll have to write them down in a programming language, at which point you have to change the name. CSS made this mistake.foo-bar
in CSS maps tofooBar
in Javascript. Rust also made this mistake with crate names. A crate calledfoo-bar
magically becomesfoo_bar
in Rust code.Has nothing to do with Ruby and everything to do with rails. Rails is terrible.
Funny because Rails is often touted as the main reason to use Ruby!
I haven’t heard that in 15 years. The main reason to use Ruby is that it’s a better Python. The tooling is 10x better, it has all the same language features and more, it has easily enough packages to handle any situation you want, and it doesn’t have all the bike shedding that Python has.
You shouldn’t be writing applications in a scripting language anyway. They’re for scripting, it’s in the name.
Well I’m no fan of Python either but it doesn’t describe itself as a scripting language (and neither does Ruby) so I think you’re way off there.
And I dunno about Ruby being a better Python. It looks way worse to me. In particular the story for static type annotation seems pretty dire. The syntax is worse, it’s less popular, and even slower!
I can believe the tooling is better though. Python’s is abysmal (unless they officially adopt
uv
- ray of hope there but I have zero faith the Python Devs would make such an obvious decision).I’ve been working in Ruby on Rails lately (unfortunately) and yeah it’s extremely bad at this. There’s so much hidden implicit behavior everywhere.
Ruby on Rails is the worst thing to ever happen to Ruby. The language is great, much better than Python from a tooling perspective. And then Rails came along and ruined everything. I sincerely believe that the reason Python won out is solely because of Rails, because Ruby is better in every other regard.
The dash
-
vs underscore_
is also a common “problem” with CLI arguments--file-name
, that are mapped to variable namesfile_name
.Yeah, translating between cases isn’t exactly a problem IME. Might be neat to have a case-aware grep though, so you can get kebab-case, snake_case, camelCase and PascalCase all done in one go.