Hacker News new | ask | show | jobs
by stevebmark 2944 days ago
Everything in Ruby happens at runtime. Even the definition `class X` becomes a runtime `Class.new` invocation. It's imperative from the inside out. Even a JIT is compiler won't and can't solve the fundamental flaws permanently baked into the language. If you want performance, Ruby probably shouldn't be the first tool you reach for.
2 comments

TruffleRuby + Graal brings full Java equivalent JVM performance to Ruby. It can even AOT compile a class definition like you described as impossible by using Partial Evaluation.

Oracle's plan for world domination via JVM is completely changing the performance landscape for dynamic languages.

This isn’t a flaw. It’s a tradeoff. And one that buys an incredibly useful amount of flexibility.
It's a "tradeoff" in the way that not writing tests is a tradeoff
Sure. Let's write a script, a website or analyse bio data together. You pick a static language. I'll pick a dynamic one. See you tomorrow.
While my main concerns about Ruby aren't directly related to type systems or static typing, at this point in my career, the speed at which I can hack out a script in a language in 24 hours isn't related to how well designed I think the language is.