124
you are viewing a single comment's thread
view the rest of the comments
[-] FizzyOrange@programming.dev 14 points 1 week ago

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.

[-] tyler@programming.dev 1 points 4 days ago

Has nothing to do with Ruby and everything to do with rails. Rails is terrible.

[-] FizzyOrange@programming.dev 2 points 4 days ago

Funny because Rails is often touted as the main reason to use Ruby!

[-] tyler@programming.dev 1 points 1 day ago

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.

[-] FizzyOrange@programming.dev 1 points 22 hours ago

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).

[-] tyler@programming.dev 0 points 21 hours ago

Ruby and Python are both scripting languages and have been since being invented. Static type annotations are a dumb thing to add to a language like Python and Ruby, they’re not static languages. If you want static typing you should be using a different language. The syntax is most definitely not worse, and that’s not an opinion, Python’s for comprehensions are nightmares of readability, and hardly make sense 5 minutes after you write them. Ruby prioritizes readability over everything else.

Speed is almost exactly the same, with Ruby winning on many benchmarks. The only people saying Python wins are Python programmers. There was a post on the clojure community the other day comparing specific instances and while clojure was winning them all, Ruby was in second on most of them.

Python only looks better from the outside. I spent years coding in both at the exact same time at the same company. The only two things Python wins on is number of packages, and even that is a dumb metric (looking at you npm), and Click, which is an absolutely fantastic CLI framework.

load more comments (2 replies)
load more comments (6 replies)
this post was submitted on 20 Dec 2024
124 points (99.2% liked)

Programming

17691 readers
113 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS