The JCP has approved JSR 241, the Groovy Language. The entire executive committee voted yes, with Sun adding a very positive comment: "Sun is happy to see Groovy proposed as a JSR. Having additional interesting languages for
the Java platform seems like a Good Thing!"
This JSR sets a huge precedent. Sun has really shown that they care a lot more about Java the platform, as apposed to just Java the language.
This is great news for the community. There was also a rumor that James Gosling himself said: "Groovy is groovy" and that he pushed for the JSR to go through.
View the results of the JSR 241 Ballot
View the JSR 241 home page
-
JCP Approves Groovy Language JSR: Sun endorses language (26 messages)
- Posted by: Dion Almaer
- Posted on: March 30 2004 08:41 EST
Threaded Messages (26)
- JCP Approves Groovy Language JSR: Sun endorses language by Michael Boyd on March 30 2004 09:22 EST
- JCP Approves Groovy Language JSR: Sun endorses language by Neil Ellis on March 30 2004 09:44 EST
- JCP Approves Groovy Language JSR: Sun endorses language by Cedric Beust on March 30 2004 09:56 EST
-
if the shoe fits... by Michael Boyd on March 30 2004 10:23 EST
- if the shoe fits... by Konstantin Ignatyev on March 30 2004 10:44 EST
-
if the shoe fits... by Aapo Laakkonen on March 30 2004 11:27 EST
-
if the shoe fits... by Jon Tirsen on March 30 2004 12:46 EST
- if the shoe fits... by Mike Spille on March 30 2004 01:42 EST
-
if the shoe fits... by Jon Tirsen on March 30 2004 12:46 EST
- JCP Approves Groovy Language JSR: Sun endorses language by Nick Minutello on March 30 2004 16:54 EST
- JCP Approves Groovy Language JSR: Sun endorses language by Neil Ellis on March 30 2004 09:44 EST
- Re: JCP Approves Groovy by ABC DEF on March 30 2004 12:10 EST
- ver y nice by Carlos Zuluaga on March 30 2004 14:44 EST
- JCP Approves Groovy Language JSR: Sun endorses language by random fletch on March 30 2004 16:40 EST
- What advantage does groovy have over other scripting languages? by Toby Hede on March 30 2004 19:47 EST
- What advantage does groovy have over other scripting languages? by Nevin Ng on March 30 2004 22:19 EST
- What advantage does groovy have over other scripting languages? by Juozas Baliuka on March 31 2004 12:23 EST
- Groovy In A Nutshell - 40+ Talk Slides In All-In-One HTML Page by Gerald Bauer on March 31 2004 02:13 EST
-
Groovy In A Nutshell - 40+ Talk Slides In All-In-One HTML Page by Aapo Laakkonen on March 31 2004 03:34 EST
-
Groovy Offers The Best From Ruby, Python and Smalltalk by Gerald Bauer on March 31 2004 04:13 EST
-
Critizizing by Aapo Laakkonen on March 31 2004 06:11 EST
- Critizizing by peter reilly on March 31 2004 10:50 EST
-
Why a *compiled* scripting language? by Darren Cruse on April 08 2004 02:56 EDT
-
Why a *compiled* scripting language? by Mike Spille on April 08 2004 03:24 EDT
-
Why a *compiled* scripting language? by Darren Cruse on April 09 2004 09:28 EDT
-
Why a *compiled* scripting language? by Mike Spille on April 09 2004 12:37 EDT
- Why a *compiled* scripting language? by Darren Cruse on April 09 2004 03:09 EDT
-
Why a *compiled* scripting language? by Mike Spille on April 09 2004 12:37 EDT
-
Why a *compiled* scripting language? by Darren Cruse on April 09 2004 09:28 EDT
-
Why a *compiled* scripting language? by Mike Spille on April 08 2004 03:24 EDT
-
Critizizing by Aapo Laakkonen on March 31 2004 06:11 EST
-
Groovy Offers The Best From Ruby, Python and Smalltalk by Gerald Bauer on March 31 2004 04:13 EST
-
Groovy In A Nutshell - 40+ Talk Slides In All-In-One HTML Page by Aapo Laakkonen on March 31 2004 03:34 EST
- What advantage does groovy have over other scripting languages? by Nevin Ng on March 30 2004 22:19 EST
- JCP Approves Groovy Language JSR: Sun endorses language by stefano fago on March 31 2004 02:19 EST
-
JCP Approves Groovy Language JSR: Sun endorses language[ Go to top ]
- Posted by: Michael Boyd
- Posted on: March 30 2004 09:22 EST
- in response to Dion Almaer
Good work! Interesting timing with recent posting by Mike Spille about using the Groovy language. With the passing of the JSR, does this effectively mean Groovy is the official scripting language for Java?
Michael -
JCP Approves Groovy Language JSR: Sun endorses language[ Go to top ]
- Posted by: Neil Ellis
- Posted on: March 30 2004 09:44 EST
- in response to Michael Boyd
Ghorrr!
You're looking for controversy Michael!
Graham (on behalf of Sun's) comment is kinda interesting isn't it. Well if Groovy can be made into a ship-shape well engineered _and_ agile language then all the better. Also MS have loads of langauges for their platform so I imagine it's a flower in the cap for Sun if they can add one 'officially' to their platform.
I think Sun's 'approval' is a good thing, any new 'agile' (for want of a better word) langauge needs some serious patronage if it's going to get used in most of our working lives.
Regards
Neil -
JCP Approves Groovy Language JSR: Sun endorses language[ Go to top ]
- Posted by: Cedric Beust
- Posted on: March 30 2004 09:56 EST
- in response to Neil Ellis
Quite a sweeping approval... Congratulations to James and his team!
--
Cedric -
if the shoe fits...[ Go to top ]
- Posted by: Michael Boyd
- Posted on: March 30 2004 10:23 EST
- in response to Neil Ellis
You're looking for controversy Michael!
I wasnt intentionally looking for controversy and if I was I dont think that is necessarily a bad thing. But I have noticed the absence of the equivalent of say VB in Java. So I was wondering (in the perception of other Java programmers) if Groovy fits that sort of shoe. I hope it is a flower in the cap and that other scripting languages come out. I forgot about PHP but then again, I have not used it (read about scalability issues). Speaking of, how does Groovy compare to PHP? Are they apples and oranges?
Best regards,
Michael -
if the shoe fits...[ Go to top ]
- Posted by: Konstantin Ignatyev
- Posted on: March 30 2004 10:44 EST
- in response to Michael Boyd
Now we are close to admit that we have several competing OS:
Linux, Java and Win(.NET is just next version of MS OS) -
if the shoe fits...[ Go to top ]
- Posted by: Aapo Laakkonen
- Posted on: March 30 2004 11:27 EST
- in response to Michael Boyd
Speaking of, how does Groovy compare to PHP?
> Are they apples and oranges?
PHP has quite impressive function library written in C. It's also very straight forward to use. Some say that you can program with PHP the way you think. I have got this feeling very often when I have worked with PHP. For example if I want 32-byte hex-decimal md5 output from something, I just call md5("something");, and these cases pop-up all the time. When doing something similar with Java I have to read api documentations and find my way out of overly complicated and abstracted Java implementations. Usually I end up with some utility class that has static method that performs the thing I want. It's quite sad that I almost always end up writing those same utilities over and over again. With PHP, this is not the case.
Right now Groovy, in my opinion, is nothing more than a new syntax. It has some shortcuts that make programming simple Java programs easier (than doing them in Java), and it has it's uses in some projects (embedded scripting in java environment, quick prototyping of Java apps, etc.). But I think that Groovy needs some PHP like utilities (maybe done in OO ways) to become something more than a syntax. Every scripting language has these (I mean libraries specifically designed for the scripting language itself). Groovy takes another approach by leveraging J2SE and J2EE etc. standard Java libraries (correct if I'm wrong). What I would like to see is that Groovy implements it's own libraries that wrap/reimplement Java libraries to make the most common things as simple as possible.
Just thoughts. -
if the shoe fits...[ Go to top ]
- Posted by: Jon Tirsen
- Posted on: March 30 2004 12:46 EST
- in response to Aapo Laakkonen
What I would like to see is that Groovy implements it's own libraries that wrap/reimplement Java libraries to make the most common things as simple as possible.Just thoughts.
Groovy actually does just this. For example it extends anything that implements java.util.Collection with an each method so you can do things like:
collection = [1, 2, 3]
collection.each { print it } -
if the shoe fits...[ Go to top ]
- Posted by: Mike Spille
- Posted on: March 30 2004 13:42 EST
- in response to Jon Tirsen
Yep. For comprehensive details, see:
http://groovy.codehaus.org/groovy-jdk.html
Most interesting to me are the ones in *Writer/*Reader, *Stream, Object, String, and of course the various Collections. You gotta love things like Reader.eachLine(), Reader.readLines(), and BufferedReader.getText(). Being able to say:
InputStream is = new FileInputStream (...some file...);
List file = is.readLines();
and getting a List of the lines in the file is extremely convenient for scripty purposes. And being final able to say something like this is just excellent:
InputStream is = new FileInputStream (...some file...);
is.eachLine ( {
// Closure with 'it' parameter containing each source line
// in successive calls.
});
-Mike -
JCP Approves Groovy Language JSR: Sun endorses language[ Go to top ]
- Posted by: Nick Minutello
- Posted on: March 30 2004 16:54 EST
- in response to Michael Boyd
does this effectively mean Groovy is the official scripting language for Java? Michael
I dont think its anyone's intention for it to be the official scripting language. Just an official scripting language...
-Nick -
Re: JCP Approves Groovy[ Go to top ]
- Posted by: ABC DEF
- Posted on: March 30 2004 12:10 EST
- in response to Dion Almaer
This is long overdue. Unfortunately Sun/JCP isn't driven by community demands, but by pressure from Microsoft. -
ver y nice[ Go to top ]
- Posted by: Carlos Zuluaga
- Posted on: March 30 2004 14:44 EST
- in response to Dion Almaer
It's soo cool to see that SUN has received groovy as j2EE languaje.
I was really thinking that java would be the only one for j2ee, but
sun has surprise me.
It's great! -
JCP Approves Groovy Language JSR: Sun endorses language[ Go to top ]
- Posted by: random fletch
- Posted on: March 30 2004 16:40 EST
- in response to Dion Almaer
Congratulations groovy!
Somehow I think this will be the shortest bile to follow up bile in the history of Hani. But you know you've made it when Hani's ulcers start acting up. -
What advantage does groovy have over other scripting languages?[ Go to top ]
- Posted by: Toby Hede
- Posted on: March 30 2004 19:47 EST
- in response to Dion Almaer
Just curious as to what advantage does groovy have over other scripting languages that run on the JVM, such as JPython or JavaScript?
I am interested because I have been using JavaScript with XWork to script my business logic. I like JS because I then have one scripting language for both the client and server, and as I also do some Flash MX work, which uses ActionScript (ECMA script). -
What advantage does groovy have over other scripting languages?[ Go to top ]
- Posted by: Nevin Ng
- Posted on: March 30 2004 22:19 EST
- in response to Toby Hede
Just curious as to what advantage does groovy have over other scripting languages that run on the JVM, such as JPython or JavaScript?
I guess the different is JPython/JRuby/etc is running on a scripting engine that itself running ontop of the JVM. So virtually the script you wrote will be interpreted twice ;-)
While Groovy is compiled into Java bytecode, which is the same as compiled Java source to the JVM. -
What advantage does groovy have over other scripting languages?[ Go to top ]
- Posted by: Juozas Baliuka
- Posted on: March 31 2004 00:23 EST
- in response to Nevin Ng
I guess the different is JPython/JRuby/etc is running on a scripting engine that itself running ontop of the JVM. So virtually the script you wrote will be interpreted twice ;-)While Groovy is compiled into Java bytecode, which is the same as compiled Java source to the JVM.
This is implementation details, some "old" scripting languages are compiled into Java bytecode too, see dynamicjava or javascript, it is not the major feature and it not performant in some cases. -
Groovy In A Nutshell - 40+ Talk Slides In All-In-One HTML Page[ Go to top ]
- Posted by: Gerald Bauer
- Posted on: March 31 2004 02:13 EST
- in response to Toby Hede
Hello,
> Just curious as to what advantage does groovy have over other scripting
> languages that run on the JVM, such as JPython or JavaScript?
Allow me to highlight my Groovy talk slides (40+) online in an all-in-HTML-page version titled "Groooooovy Babe: Jazzing Up Plain Old Java".
To quote from the slide titled "Why Groovy? What's wrong with Python (Jython), Ruby (JRuby) or Smalltalk (Bistro)?"
Why yet another scripting language?
* Groovy builds on (reuses) the Java standard class library; Python, Ruby or Smalltalk include their own batteries (that is, standard libraries)
* Groovy uses a Java-like syntax; easy to switch from Java to Groovy or from Groovy to Java
* Groovy compiles straight to standard Java bytecode; you can use Groovy (groovyc) as an alternative compiler to javac
- Gerald -
Groovy In A Nutshell - 40+ Talk Slides In All-In-One HTML Page[ Go to top ]
- Posted by: Aapo Laakkonen
- Posted on: March 31 2004 03:34 EST
- in response to Gerald Bauer
Groovy builds on (reuses) the Java standard
> class library; Python, Ruby or Smalltalk
> include their own batteries (that is, standard
> libraries)
Likewise Groovy has to reimplement/wrap several (or all) J2SE /J2EE etc. libraries to make them even remotely usable in scripting environment (eg. Collections, Readers (allready done) and this list should continue to contain most of J2SE classes (not yet done) -> meaning Groovy has it's own standard library). If they are not going to do that, then Groovy gives a little over plain Java.
> Groovy uses a Java-like syntax; easy to
> switch from Java to Groovy or from Groovy
> to Java
So does C++, C#, JavaScript and many others.
> Groovy compiles straight to standard Java
> bytecode; you can use Groovy (groovyc) as
> an alternative compiler to javac
That's what all other 30+ JVM scripting languages have done for ages. -
Groovy Offers The Best From Ruby, Python and Smalltalk[ Go to top ]
- Posted by: Gerald Bauer
- Posted on: March 31 2004 04:13 EST
- in response to Aapo Laakkonen
That's what all other 30+ JVM scripting languages have done for ages.
First, I'm not a Groovy fanatic and you're free to choose whatever scripting language you think is best. I've even assembled a Scripting Languages for Java page over at the Viva! site.
Anyway, even though most scripting languages compile down to bytecode Groovy goes further. If I may quote from the "Compiling Groovy Scripts Using groovyc" slide:
Note, that every Groovy class becomes a "normal" Java class that you can use inside your Java code. The only difference between a Groovy generated Java class and a plain old Java class is that a Groovy generated Java class supports the groovy.lang.GroovyObject interface.
- Gerald -
Critizizing[ Go to top ]
- Posted by: Aapo Laakkonen
- Posted on: March 31 2004 06:11 EST
- in response to Gerald Bauer
you're free to choose whatever scripting language
Of course (I'm not an idiot). I just wanted to critizize Groovy (I did try to do it in a constructive manner).
> Compiling Groovy Scripts Using groovyc
I don't see how this differs from eg. (except that Groovy implements GroovyObject):
http://jython.sourceforge.net/cgi-bin/faqw.py?req=show&file=faq06.001.htp
I have to admit that Groovy has more elegant Java bindings than other similar projects, but Groovy without it's own libraries (J2SE doesn't fit, in my opinion, in scripting environment) is just another syntax. -
Critizizing[ Go to top ]
- Posted by: peter reilly
- Posted on: March 31 2004 10:50 EST
- in response to Aapo Laakkonen
The classes genererated by groovy and beanshell 2.0 are
real java objects -
one can use reflection on them to get the methods / fields.
This is very usefull for intergrating with other systems, for
example with ant, it is easy to write ant tasks in groovy
or beanshell. -
Why a *compiled* scripting language?[ Go to top ]
- Posted by: Darren Cruse
- Posted on: April 08 2004 14:56 EDT
- in response to Gerald Bauer
I attended a presentation on Groovy at a Java conference recently, and the big surprize for me was that Groovy was a compiler and not an interpreter. I've used Perl, Java, and played with BeanShell, and when I heard of Groovy as a standard "scripting" language I just assumed it would be an interpreter, since for me the joy of using a scripting language, aside from loose typing, is switching from the edit/compile/run mode into the more comfy and streamlined edit/run.
Seriously, when I think of working with JavaScript and being able to make a change, save it in the editor and just refresh my browser to test, versus (for example) working on Struts Action code and having to re-compile it and redeploy it to the app server, I think the interpreted approach wins hands down for programmer productivity. At least it seems so to me, and so when I realized Groovy was still a compiled language might first thought was this was a big mistake and if Sun wants something that truly *complements* Java they would have better chosen something more like BeanShell (i.e. an interpreted Java with optional loose typing features).
Am I making too much of this? Are they planning to do things analogous to the way JSP's are auto-magically compiled to make it feel more like an interpreted scripting language? Or am I wrong to think of compilation as a significant headache?
I don't think I'm wrong - but I'm curious what others think. Obviously there's smart people who approved this JSR. I just think practically and politically something like BeanShell would have been a better "standard" Java scripting language. -
Why a *compiled* scripting language?[ Go to top ]
- Posted by: Mike Spille
- Posted on: April 08 2004 15:24 EDT
- in response to Darren Cruse
Darren, yes it's compiled, but if you want to use it in a scripty way you often can't tell that it is.
Groovy ships with a wrapper program (called 'groovy' :-) that lets you execute scripts directly. Well, you're not really doing it directly but it acts as if it does. It's not exactly like, say, perl, but it's close enough so that you can't tell the difference most of the time.
So it's easy to just say:
groovy myscript.groovy
or to use Unix #! notation:
#!groovy
// Groovy code
-Mike -
Why a *compiled* scripting language?[ Go to top ]
- Posted by: Darren Cruse
- Posted on: April 09 2004 09:28 EDT
- in response to Mike Spille
You're right that is pretty slick - does make it look just like other scripting languages when running from the command line. There's two other modes I'm curious about though:
a. Embedded usage/"Eval": e.g. I'd like to embed Groovy snippets to act as Struts actions, and iteratively refine/debug them (i.e. edit/test/edit/test quick quick quick - i.e. no headaches/slowdowns from app server redeployment).
b. Interactive usage: e.g. The "shell" in "BeanShell" is that it literally has an interactive shell, where you can interactively develop and debug programs from this BeanShell "command line". Great for learning and debugging.
Do you know if Groovy can work in these modes? -
Why a *compiled* scripting language?[ Go to top ]
- Posted by: Mike Spille
- Posted on: April 09 2004 12:37 EDT
- in response to Darren Cruse
On a), yeah you can embed Groovy, but it's a little wordy right now. You have to instantiate an object (GroovyShell?) and you pass the script into that. This should let you do what you want though.
On b), there's Groovy shell (groovysh) and a simple Swing app groovy console that act as an interactive shell. They're very basic though - personally I find them kind of annoying. It's easier just to write scripts in an editor.
-Mike -
Why a *compiled* scripting language?[ Go to top ]
- Posted by: Darren Cruse
- Posted on: April 09 2004 15:09 EDT
- in response to Mike Spille
Thanks for the info Mike. Overall sounds real good. -
JCP Approves Groovy Language JSR: Sun endorses language[ Go to top ]
- Posted by: stefano fago
- Posted on: March 31 2004 02:19 EST
- in response to Dion Almaer
Good Luck!
...but this is the beginning of the end!...Playing with the same model of Microsoft (Groovy==VB&family) is not the answer!...
However show must go on!