8

I am a novice programmer who mainly uses Java. Recently I have become interested in Ruby, and when I went to download an IDE, I was surprised to find that there is no single implementation or interpreter of the language. I've been trying to research the issue, but I don't really understand how a language is created well enough to know what to look for.

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

cotroxell
  • 183
  • 4
  • 8
    There are multiple implementations of *most* languages, [including Java](http://en.wikipedia.org/wiki/Blackdown_Java). – user229044 Apr 20 '11 at 17:04
  • 1
    Not just languages. Almost any kind of software: web browsers, GNU emacs vs. xemacs vs. xyzzy, different terminals sharing the same shell language, .... – sawa Apr 20 '11 at 19:04
  • @meagar thanks for that answer, I had a suspicion that was the case, but wasn't sure! – cotroxell Apr 21 '11 at 14:57

3 Answers3

8

Because different language implementors decide to focus on a particular area. For instance, compatibility with the Java runtime (JRuby), or experiment with JIT (rubinius), target Ruby at the enterprise (REE), etc., etc...

This isn't unique to Ruby either, it's healthy in a language, if a particular group sees potential with the language in a certain area, it can help foster growth within that community.

jer
  • 20,094
  • 5
  • 45
  • 69
5

Most languages have multiple implementations. It turns out there are tradeoffs that can't always be worked around with a single project.

  • Platform Integration
    The closer you integrate with one platform, the further you are from integration on others. So there is a fundamental choice to make: specialization or generality.

  • Stability
    If you are willing to accept instability, then more ambitious goals can be pursued. So there is a fundamental choice choice to make: development or stability.

  • Management Team
    There is only room for so much management in any given project. The only way to create a new management space is to create a new project. So there is a fundamental choice to make: your project or my project. In a sense, this is the "master reason", as different managers will choose different priorities.

DigitalRoss
  • 143,651
  • 25
  • 248
  • 329
  • Thank you for the answer. I think I am mostly confused about platform integration. So are there different implementations because somebody has to actually connect a language to low-level commands that are specific to the platform? I guess I thought that that was in the domain of the compiler, and not part of the language itself. – cotroxell Apr 21 '11 at 15:03
  • Yes, every language has an associated system interface. If it's completely generic, like Java, it tends to be limited and fail on all clients but it can (as Java has) succeed greatly on servers. If it's complete and tilted in one direction (as Ruby is towards Unix) then it can also succeed on clients, although in this case Ruby arrived too late for the rich-client heyday. I could write an entire book about languages vs GUI-integration. It's too big a subject for a SO comment. – DigitalRoss Apr 28 '11 at 03:10
2

It is nearly all languages that have multiple implementations including Java(e.g. Oracle Java, Apache Harmony, OpenJDK). But if you want the default implementation of ruby you can use the following: default ruby implementation using YARV.

But otherwise, different implementation are there for you to be able to use ruby on an existing framework as with JRuby with Java VM, and IronRuby, as to cater for an existing platform or application in the industry.

Yet Another Geek
  • 4,251
  • 1
  • 28
  • 40