• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Non-Java "Scripting Language" Most Like Java and Still Known

 
Gary Furash
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Like all developers (or just power users), I have pretty frequent need to automate things. Java itself is often too much - it doesn't need compiling, to be super robust, etc. Maybe it's just a one time. BASH, PERL, PYTHON, and RUBY have all been suggested to me, but they're not really anything like Java. I'm aware that there are Java-like scripting languages (Beanshell, Groovy, etc.) and also JavaScript scripting languages (Rhino, etc.) - JavaScript is pretty ubiqitous for the web.

Given the above, has anyone have any POSITIVE experiences with either the java-like scripting languages or the java-script desktop scripting languages?

THANK YOU
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65217
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Groovy is the one that matches your Java-like criteria most closely.
 
Sam Saint-Pettersen
Greenhorn
Posts: 7
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've experimented with Groovy and Jython in Java/Scala and found both pretty straightforward to integrate. Especially Groovy if I remember correctly. I also liked Groovy in a JVM environment because it was a very Java-implemented way of doing things.
 
Gary Furash
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. Groovy sounds like a good choice. Do you know if you can do something like force a "strict" syntax so you don't get into the habit of using it's admittedly nice syntactical sugar.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50189
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that discussion would fit better into our Groovy forum. Moving.
 
chris webster
Bartender
Posts: 2407
33
Linux Oracle Postgres Database Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gary Furash wrote:Thank you. Groovy sounds like a good choice. Do you know if you can do something like force a "strict" syntax so you don't get into the habit of using it's admittedly nice syntactical sugar.

Why would you want to do that? The whole point of Groovy is it allows you to do things much more easily than in Java, so why try to turn it back into Java? You're much better off learning to write idiomatic Groovy so you can take full advantage of all that "syntactic sugar".

Also, there is nothing in principle to stop you mixing Java and Groovy code in your project, as well as using it as a very flexible stand-alone scripting tool that still gives you direct access to the full power of Java's libraries. And Groovy is also the basis for the excellent Grails web application framework (think Rails for Java). One other perceived advantage of Groovy over JVM ports of other languages such as Jython or JRuby is that Groovy is an "indigenous" JVM language, so you know you're always dealing with the definitive implementation. And the name is much, well, groovier...

For a quick intro to the benefits of Groovy for Java developers, check out Ken Kousen's video on Improving Java with Groovy. And give Groovy a try - I'm sure you won't be disappointed.
 
Gary Furash
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You won't get any argument from me on the quality of Groovy and it's niftyness as a language. I helped some time back (3+ years ago) with testing and docs (once, but it was still fun). But, I haven't really seen it used since then nor heard as much about it in the marketplace. It's good to know it's still popular.

I'd only use "strict" because I'd just want to avoid "bad habits" when I have to do my java (e.g., using the easier syntax and waiting for an error in my IDE).

No argument on Groovy itself though, and you're probably right that the limited number of syntactical differences won't screw up my normal programming.
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have definitely been impressed by the ease of parsing JSON, XML using the Slurpers provided. And it doesnt have a long learning curve.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic