Why are there different Ruby implementations?

I am a novice programmer who mainly uses Java. I recently became interested in Ruby, and when I went to download the IDE, I was surprised to find that there is no single language implementation or interpreter. I tried to investigate the problem, but I really don’t understand how the language is created well enough to know what to look for.

How is it possible for one language to have multiple interpreters? Does this mean that there are important differences between them, and what does this mean for the programmer? Please excuse me if this is a blatant question first!

+7
source share
3 answers

Because different language developers decide to focus on a specific area. For example, compatibility with Java runtime (JRuby) or experiment with JIT (rubinius), target Ruby in the enterprise (REE), etc. Etc....

This is not unique to Ruby, but it is great in the language, if a certain group sees potential with a language in a certain area, it can contribute to growth in this community.

+7
source

Most languages ​​have several implementations. It turns out that there are trade-offs that cannot always be circumvented with a single project.

  • Platform integration
    The closer you integrate with one platform, the farther you are from integration on others. Thus, there is a fundamental choice: specialization or community.

  • Stability
    If you are ready to accept instability, then more ambitious goals can be undertaken. Thus, there is a fundamental choice choice: development or stability.

  • Management team
    In any project there is only room for such management. The only way to create a new management space is to create a new project. Therefore, there is a fundamental choice: your project or my project. In a sense, this is the “main reason” because different managers will choose different priorities.

+4
source

Almost all languages ​​have many implementations, including Java (for example, Oracle Java, Apache Harmony, OpenJDK). But if you want to use the ruby ​​by default, you can use the following: a standard ruby ​​implementation using YARV .

But otherwise, you will have the opportunity to use ruby ​​for your existing infrastructure, like with JRuby with Java VM, and IronRuby to serve an existing platform or application in the industry.

+1
source

All Articles