Slashdot Mirror


JRuby Great Addition To Java Development

An anonymous reader writes "JRuby combines the object-oriented strength of Smalltalk, the expressiveness of Perl, and the flexibility of the Java class libraries into a single, efficient rapid development framework for the Java platform. This article introduces JRuby, a sophisticated addition to your Java development toolbox."

4 of 51 comments (clear)

  1. other languages by Intrigued · · Score: 4, Informative
    To my understanding, this is one script interpreter that is being developed for Java. It offers ease of use for people accostumbed to working with Ruby.

    For a larger view of the language development being done similar to this, take a look at List of Java virtual machine languages.

    I should think that most people will find at least something that appeals to them.

  2. Re:So what exactly is the difference... by bonniot · · Score: 5, Informative
    Ruby and Groovy are different languages. They happen to be both scripting languages, and to have an implementation that runs on the jre (Java Runtime Environment), that's all.

    The JRuby article is part of the alt.lang.jre series, with announced articles about "Rhino, Nice, and NetRexx, and many other exciting alternate languages for the JRE". It looks like the articles are coming in this order, one around the beginning of each month.

  3. Hrmph. by Estanislao+Mart�nez · · Score: 4, Informative
    Last I looked (which can't have been over a month ago), JRuby was far from being ready for prime time. I'm a Ruby guy myself, yet I really wouldn't touch JRuby just yet, unless my purpose was to develop it myself.

    Groovy is, IMO, a near-clone of Ruby designed from the ground up to integrate with Java, and would probably be a better choice than JRuby. I think the Groovy documentation isn't quite there yet, tugh.

  4. Re:JRuby versus Java [code comparison - short] by Eivind+Eklund · · Score: 3, Informative
    ... and we have a loser writing.

    When you have zero clue how to write the language, I suggest you shut up.

    The equivalent Ruby is (sorry about the lack of indentation - Slashdot seems to eat it):

    require 'java'
    include_package 'javax.swing'

    class Calculator < JFrame
    def initialize
    super("Slashdot Rul3z")
    setSize(400, 400)
    setVisible(true)
    end
    end

    Calculator.new()

    That's exactly one require-line and two blank lines more than your non-idiomatically-indented Java with missing newlines. It is one line less than what I'd consider normal amount of spacing - a newline after the import statement, a newline between the methods, and the {}-block for main actually spaced out.

    Eivind.

    --
    Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.