Meet Opal 1.0 – compile-to-JS language for Ruby

Meet Opal 1.0 – compile-to-JS language for Ruby
Average rating: 0
(0 votes)

Thanks! You’ve rated this material!

It has been a while since the last Ruby releases. And today is a big day as it’s time to meet Opal 1.0 – compile-to-JS language for Ruby. Learn more about possibilities for using Ruby for frontend code. The new features are just amazing!

Opal 1.0 comes with complete maps of the original MRI design. The prototype chain of any object will now have an entry for every Ruby ancestor. Let’s explore the main features:

  1.  Additions of Module.prepend. To get the best performance, remember the rule for Opal and MRI, you need to do all your include/prepend/extend functions as early as possible and never touch them again if you can.
  2.  If you run Opal on MRI you can now add the c_lexer gem to your Gemfile and save time while compiling your code.
  3. The possibility of full filenames in compiled code.
  4. Adding of stack traces that find the error in the Opal code
  5. Better use of displayName to clearly between Ruby and JavaScript in stack-traces.
  6. Inline all-in-one source maps comment with improved precision.
  7. Possibility to ignore missing requires during compile-time and only raise errors at runtime.

There is a bunch of other very useful features that you can be familiar with in this awesome material on the official Opal blog.

Don’t miss the chance to learn about Function Composition in Ruby on our blog. This might help you understand our proficiency and level!

Rate this article, if you like it

Thanks! You’ve rated this material!

Got a project? Let's discuss it!

    Kyiv Sofiivska 1/2a, 01001, Kyiv, Ukraine
    Dnipro Hlinky 2, of. 1003, 49000, Dnipro, Ukraine
    Kharkiv Otakara Yarosha 22, 61000, Kharkiv, Ukraine