Polyglot programming

Joe Ottinger writes on TheServerSide.com that polyglot programming has become a bit of a meme, with many pointing out how different languages bring different strengths. Polyglot, in this context, allows programmers to use scripting for some tasks, Java for other tasks, with other languages like C# providing other external services.

JSR 223 is the JSR providing the Scripting API for Java. The concept behind it is that a programmer gets a ScriptEngine, which refers to a mechanism executing scripts in a given language, and then passes that ScriptEngine source code in some fashion – through a Reader or InputStream, or even as individual lines of code.

Thus, writes Ottinger, the Java platform itself can be used as a launch point for polyglot programming, after a sense, in that you can write modules in various languages (JavaScript, Ruby, Python, Groovy, BSF) and use them from within a Java framework and on the Java platform.

Related
Polyglot programming and the Java platform - TheServerSide.com
Polyglot programing - Memagora
JSR 223: Scripting for the Java Platform - JCP.org


Leave a Reply