• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Groovy is the one that matches your Java-like criteria most closely.
 
Greenhorn
Posts: 7
Scala Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that discussion would fit better into our Groovy forum. Moving.
 
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic