Programming language: Ruby 3.0 promises significant performance gains

Source: Heise.de added 28th Dec 2020

  • programming-language:-ruby-3.0-promises-significant-performance-gains

Years ago 25 the first major version of Ruby came out shortly before Christmas, and since then there has been a Christmas release tradition among the editors of the programming language established: Ruby 3.0 also joins this choir and has now been released on schedule, almost exactly one year after the last release of the 2.x series – Ruby 2.7. The development of Ruby 3.0 apparently began five years ago and Ruby inventor Yukihiro Matsumoto promises a three times faster execution of programs written with Ruby 3.0 than those programmed with Ruby 2.

Release jump with new features Matsumoto (simply called “Matz” in the community) confirmed on GitHub at the beginning of September, that Ruby developers expect a big release jump around Christmas. Ruby had ridden the 2-series tracks for seven years. Ruby developers have announced in advance that Ruby 3.x can expect higher performance compared to 2.x – albeit with room for improvement. A lot of work on the method-based JIT compiler MJIT has probably contributed to the better performance. Old dependencies with the Ruby-Gems packaging system have apparently been eliminated, and Ruby 3.0 introduces new concepts.

An important innovation is the support for RBS, a language for describing the types of Ruby programs. With TypeProf, there is also an analysis tool that can read simple, i.e. not type-annotated Ruby code and recognize its methods. A still experimental feature is Ractor, an abstraction for concurrent programs inspired by the actor model, which was developed to offer a parallel execution function without concerns about thread safety. The Fiber # scheduler was introduced to intercept blocking operations. It enables simple concurrency without having to change any code. The thread # scheduler has also left the experimental stage: it can be used to intercept blocking processes.

Ruby 3.0 supports RBS With Ruby, methods in classes and instance variables in define their type. Inheritance or mixed relationships are also possible. The goal of RBS is to support well-known patterns in Ruby programs. It enables writing of complex types, including union types, method overloads and generics.

RBS is also said to support duck typing with interface types. Duck typing is a concept of object-oriented programming. The class does not describe the type of an object, but the existence of certain methods or attributes is decisive. The third major version of Ruby contains rbs gem , which is supposed to enable the parsing and processing of type definitions written in RBS. Type checkers, including type profilers and other tools that support RBS, are intended to better understand Ruby programs with RBS definitions.

Ruby, the Rednosed Reindeer? The programming language has been around since 1993, it was invented by the Japanese developer Yukihiro “Matz” Matsumoto. Ruby is open source and used specifically for web development. Platforms such as GitHub, Shopify, Stripe and AirBnB actively use Ruby. The language was learned years ago through the “Ruby on Rails” web framework written in Ruby Buoyancy.

Ruby is essentially object-oriented, but also supports other paradigms and concepts such as dynamic typing, reflections and automatic garbage collection. Programs written in Ruby are interpreted at runtime, and the advantage is that the code is not particularly complex. This is said to have brought some developers frustrated by more complex languages ​​on board.

Further information A Most of the features were already known from the preview, and the timetable had been in place since September. Further information can be found in the release message.

(sih)

Read the full article at Heise.de

brands: Advance  CODE  Jump  New  other  Writing  
media: Heise.de  
keywords: Open Source  

Related posts


Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 88

Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 88

Related Products



Notice: Undefined variable: all_related in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 91

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/rondea.com/httpdocs/wp-content/themes/rondea-2-0/single-article.php on line 91