Should You Upgrade to Ruby 3.0?

01-Feb-2021 2225
I sometimes like to subvert clickbait journalism by containing the answer to "questions in the headline" in the first sentence. So, if that's all you needed, stop reading. If you're interested in more detail, read on!Any question about "should I upgrade?" needs to answer "what changed?".RBS and Typeprof. If you're into static typing and you want to use The Official Ruby Way To Do It, you need to upgrade to Ruby 3. There is of course, also Sorbet, which probably won't go anywhere soon as it's baked in to the codebase at Stripe, and you can use that today on Ruby 2.7.Ractor and the Fiber Scheduler. Both of these new APIs solve similar problems (concurrency) but in slightly different ways. Ractors introduce true parallelism through an Actor-like approach, and the Fiber Scheduler aims to make "event loop" style concurrency easier. Both APIs will generally be used solely at the library level, and will probably not be used in many applications directly. That means there's no point in upgrading for these features until libraries actually use them, which hasn't happened yet.Lots of Cool Syntax Bois, like the find pattern, endless method definition, Hash.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle