Slashdot Mirror


Groovy JSR: A New Era for Java?

fastdecade writes "Groovy, the open-source scripting language, has been submitted for a Java Specification Request (JSR). And not without strong support from venerable J2EE practitioner/author, Richard Monson-Haefel, who labels this "the beginning of a new era in the Java platform". Groovy can use Java objects easily and compiles to JVM byte code, but it is nonetheless a scripting language at heart and a great companion for the more heavyweight Java programming language. Most JSRs concern new APIs, and this is the first JSR for an alternative language. Imagine a common platform of standardised languages talking to each other ... this looms as a big threat to .Net and a rejuvenation of the Java platform."

13 of 100 comments (clear)

  1. Imagine.... by argel · · Score: 4, Informative
    Imagine a common platform of standardised languages talking to each other ...

    You mean like Parrot?

    --

    -- Argel
  2. Isn't this more a threat to Perl than .Net? by ObviousGuy · · Score: 5, Insightful

    Having a glue language to tie together Java objects is definitely cool, as is having the scripting language compile down to bytecode for easy deployment.

    I guess in some obscene way, one could infer that Java is somehow a threat to .Net because its set of tools has grown a little, but Groovy itself seems to be more a threat to Perl and Python and other scripting languages rather than anything Microsoft is doing (except for WSH, but is anyone really using that?) Having a scripting language that can reach directly into Java bytecode without having to invoke a separate VM is a great improvement over the current methods of running external Java programs.

    Frankly, to me, it doesn't matter which 'platform' succeeds. Both frameworks exist on many platforms, so whichever wins, we all benefit.

    --
    I have been pwned because my /. password was too easy to guess.
  3. Let Me Get This Straight by Markus+Registrada · · Score: 4, Insightful
    This is like Python, except it's less portable (because JVMs are less widely ported than Python), and has a bigger memory footprint (because it uses JVM garbage collection instead of Python reference-counting), and it uses libraries with different actual semantics and different bugs on different platforms (because they're the Java libraries).

    It sounds to me like anywhere you think you want this, you would be better off with actual Python.

    1. Re:Let Me Get This Straight by Anonymous Coward · · Score: 5, Interesting

      This is like Python,

      Except it's actually elegant, based on Smalltalk, not whatever the heck Python is inspired by.

      And Python reference counting stinks, I just spent weeks debugging a C extension that keeps killing a Python-based server.

      I use Python, but I sure don't think there's anything "great" about it, at least not enough to explain why it seems *every* language discussion includes somebody who thinks Python is god's gift to computer science.

      Python came along at a time when people where starting to use Perl for bigger projects and realizing that Perl is really BAD for big projects. Momentum took over from there.

    2. Re:Let Me Get This Straight by malachid69 · · Score: 4, Insightful
      it's less portable (because JVMs are less widely ported than Python)

      What platforms is Java NOT ported to?

      I know it is available for Windows, Linux, FreeBSD, AIX, HP-UX, Solaris, AS/400, Handhelds (Palm, Handspring, SaveJe, etc), and direct hardware (PTCU and TINI)... What's missing?

      --
      http://www.google.com/profiles/malachid
    3. Re:Let Me Get This Straight by FFFish · · Score: 4, Informative

      It's even less like Python, because Python has a port named Jython which... you guessed it! provides Python scripting within Java.

      --

      --
      Don't like it? Respond with words, not karma.
    4. Re:Let Me Get This Straight by Pengo · · Score: 4, Insightful

      "It sounds to me like anywhere you think you want this, you would be better off with actual Python."

      Unless you want access to any of the miriad of Java libraries that are available, such as JDBC drivers, XML parsers, SOAP tools and 3rd party components you may want to use unless you prefer to use something like Jython.

      I have to work with other bits of code and systems all the time, and thats the main headache with using Python that I run into.

      Python might be king of quick hacks, but for a large-scale project where bits of scripting code might be appropriate, this sounds like an excelent option where you would NOT be better off with python.

  4. *blink* hey this is COOL by Anonymous Coward · · Score: 5, Interesting

    As a hardcore Ruby lover, I've been unhappy that I can't use Ruby with the vast libraries available for Perl and other established libraries.

    But this groovy thing looks like a really nice smalltalk-esque language that hooks right into Java, enough to satisfy both sides of my brain.

    This is cool and I can benefit from this *right now* in my work. Forget Parrot or Perl 666 (heh).

    How come I never heard of this? And why doesn't jpackage have it?

  5. rejuvenation? by sfjoe · · Score: 4, Insightful

    ...and a rejuvenation of the Java platform.

    I think people who make statements like this aren't really aware of how widespread the usage of Java is in enterprise and multi-tiered systems.

    Java is not just applets.

    --
    It's simple: I demand prosecution for torture.
  6. Re:Warning, Obligatory Jython reference ahead by cxvx · · Score: 4, Informative
    Environmental Variables. Java used to have them. But because of the Mac (oS 9 and before, mind younot OSX) it was removed from the language. Instead, we have -D parameters on the command line. Oh Joy. So to run a program with a different config directory than expected I get:

    Actually, as of JDK 1.5, System.getenv() is undeprecated (is that even a word? :). I'm sure that was a first in the java libraries though :)

    --
    If only I could come up with a good sig ...
  7. Re:Scripting with .NET by iebgener · · Score: 5, Informative

    In Java, you can't unload code/type from the classpath (core classes you had when you started java) but if the class comes from a different classloader (created at runtime), you can do pretty much what you want... if you own the classloader...

    The only limitation is that the class must not be on the classpath (for security reason). This is also how you can have the same class but with different version on the same VM.

    See : http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ ClassLoader.html

  8. What platforms is Java NOT ported to? by Tumbleweed · · Score: 4, Funny

    > What platforms is Java NOT ported to?

    Atari 800. It's very frustrating.

  9. Great but why a JSR by Laz10 · · Score: 4, Informative

    There are many other scripting languages for java than groovy.

    Beanshell (Lightweight Java)
    http://www.beanshell.org/

    JavaScript (Rhino)
    http://www.mozilla.org/rhino/

    Python (Jython)
    http://www.jython.org/

    Ryby (JRuby)
    http://jruby.sourceforge.net/

    has all been available for several years without being made a JSR.

    What qualifies groovy to become a JSR instead of them ? Isn't choice good.

    IBM has open sourced a framework called BSF
    http://jakarta.apache.org/bsf/
    that allows for integrating scripting languages into java. I could see why THAT would be promoted to a JSR -- not a specific scripting language.

    As the name suggests it looks like groovy is just a couple of guys who have been playing around with tossing "groovy" language features into their homegrown scripting langugage. Cool, interesting but why make it part of the big package ?