Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is your preferred scripting language in java world (scripting language on JVM) and way? [closed]

What is your preferred scripting language in java world (scripting language on JVM) and way? When do you prefer your scripting language over java (in what situations for example for prototyping)? Do you use it for large projects or for personal projects only?

like image 841
Darius Kucinskas Avatar asked Mar 18 '09 07:03

Darius Kucinskas


People also ask

Which language is used for JVM?

The JVM was initially designed to support only the programming language Java. However, as time passed, even more languages were adapted or designed to run on the Java platform.

Why would you choose alternative JVM languages over the Java programming language?

These languages provide many benefits, such as enabling you to write code in a more concise way, use dynamic typing, or access popular functional programming features. I hope this article has sparked some interest in alternative languages and that it will encourage you to check out the wider JVM eco-system.

What type of scripting language is Java?

Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible.

In which language is the Java compiler and JVM is written?

The very first Java compiler was developed by Sun Microsystems and was written in C using some libraries from C++. Today, the Java compiler is written in Java, while the JRE is written in C.


2 Answers

For me, Clojure wins hands down. Being a Lisp, it's concise and dynamically typed, it has enormous expressive power so I can write a lot of functionality in a few lines. And its integration with Java is unsurpassed – I'm only partly joking when I say Clojure is more compatible to Java than Java itself. As a result, the entire breadth of Java libraries, both from the JDK and 3rd party, is fully useable.

Finally, with a little care Clojure code can be as fast as Java code, so I'm not even losing performance.

like image 164
Carl Smotricz Avatar answered Sep 19 '22 04:09

Carl Smotricz


My favorite is Jython, and I use it by embedding a Jython interpreter in my Java application. It is being used in commercial projects, and it allows to easily customize the application according to the customers' needs without having to compile anything. Just send them the script, and that's it. Some customers might even customize their application themselves.

like image 25
Joonas Pulakka Avatar answered Sep 22 '22 04:09

Joonas Pulakka