Live data from Hacker News

Ruby 4.0.0

ruby-lang.org

21–30 of 197 posts

Re: Ruby 4.0.0

#21

I haven't looked at Ruby for a long time. I've moved away due to the lack of typing. Any degree of typing would be helpful. Does it support typing yet?

_low_type_ is early days still, but I think this approach is clearly the future of ruby typing. If this gets baked into the language for full “compile” time support and minimal performance impact, it will be amazing: https://github.com/low-rb/low_type

Re: Ruby 4.0.0

#22

I'm happy to see v4.0, but 2025 was the year I switched from Ruby to Python after gradually drifting back to it more and more. The tipping point was when I had Claude Code automatically convert one of my Ruby projects to 100% Python - and after that, I just had no Ruby left. I spent over a decade enjoying Ruby and even wrote a book about it. At this point, though, Python has won for me: fastapi, pytorch, langchain, s…

You should try Falcon too.

Re: Ruby 4.0.0

#23

I haven't looked at Ruby for a long time. I've moved away due to the lack of typing. Any degree of typing would be helpful. Does it support typing yet?

There’s projects trying to implement it. But I’ve never seen a project using typed Ruby.

I think most people who cared just moved to typescript.

Re: Ruby 4.0.0

#24
post #19
post #12

It's never Christmas without a new ruby version. The ruby::box thing looks pretty interesting, from a cursory glance you can run two simultaneous versions of something like a feature or rollout much more conveniently. Also being able to do if condition1 && condition2 ... end on multiple lines rather than one - this is pretty nifty too!

I've been doing if condition1 && condition2 ... end for ages and it seems to work find, what am I missing with this new syntax?!

Personally && in the new line seems to be much better readability. Can’t wait to use some smart cop to convert all existing multiline ifs in my codebase.

Re: Ruby 4.0.0

#25
post #19
post #12

It's never Christmas without a new ruby version. The ruby::box thing looks pretty interesting, from a cursory glance you can run two simultaneous versions of something like a feature or rollout much more conveniently. Also being able to do if condition1 && condition2 ... end on multiple lines rather than one - this is pretty nifty too!

I've been doing if condition1 && condition2 ... end for ages and it seems to work find, what am I missing with this new syntax?!

Less likely to cause git merge conflict as you don't change the original line. You only add one.

Re: Ruby 4.0.0

#26

Earlier quoted context omitted.

Unfortunately, the type support is still useless. I abandoned Ruby for the same reason, and it is still relatively slow and eats a lot of memory.

It's literally faster than Python but ok.

Is being faster than Python considered to be a notable feature?

Re: Ruby 4.0.0

#27
post #26

Earlier quoted context omitted.

It's literally faster than Python but ok.

Is being faster than Python considered to be a notable feature?

Python is one the most popular programming languages. Ruby fits into a similar category as Python (high level, interpreted scripting language, very dynamic, has a rich ecosystem with tons of existing code). Being faster than Python makes it more attractive to use, or port Python codebases to.

Re: Ruby 4.0.0

#29
Ruby is amazing. I recently built a layer on top of Rails that can generate an API from a single markdown file. I did the same thing in python but it was much harder and JavaScript would have been a beast. Ruby can meta program like nothing else.

Re: Ruby 4.0.0

#30

I haven't looked at Ruby for a long time. I've moved away due to the lack of typing. Any degree of typing would be helpful. Does it support typing yet?

_low_type_ is early days still, but I think this approach is clearly the future of ruby typing. If this gets baked into the language for full “compile” time support and minimal performance impact, it will be amazing: https://github.com/low-rb/low_type

It is definitely better than RBS and Sorbet. But unless Github / 37Signals or Shopify decide to use it, it is highly unlikely Ruby Core will consider it.

Out of all three I think Shopify have the highest possibilities. There may be additional usefulness interms of ZJIT.

Post reply on HN