[jdom-interest] My take on JSR 223

Michel Pelletier michel at dialnetwork.com
Tue Jun 17 17:21:13 PDT 2003


I've read:

http://www.jcp.org/en/jsr/detail?id=223

and would like to provide my opinion on the document from a Java and Python 
programmers perspective.

For background to those unfamiliar with Python/Jython:

Python is a high-level, object-oriented scripting language whose interpreter 
and many core modules are written in C.  From the perspetive of JSR 223, it 
is very much like any other scripting language like PHP or Perl.

Jython is an implementation of the Python language written in 100% Java.  
Jython compiles Python code directly into Java bytecode .class files that are 
indestinguishable to the JVM from .java compiled files.  For distinction, 
Jython programmers call the Python implementation written in C "CPython".  
JSR 223 does not really specify much about scripting languages implemented in 
Java itself.

Both CPython and Jython can benefit from something like JSR 223, but I think 
the scope of the JSR is too narrow and slightly off target.

The JSR focuses on web scripting, but this leaves out a huge amount of 
scripting language use cases.  Scripting languages are not just about web 
pages.  Much more often they are used as "rapid" application development 
languages,  "simple" configuration files, high level application glue, a tool 
for users to extend any kind of program, a tool for users to automate certain 
common tasks ("macro" uses) and many others.

The thought and effort that goes into this JSR will need to be duplicated, 
bacwarded against, or replaced by something new when the Java developers 
realize (and they *will* realize) that they need a general, non-web specific, 
standard API for other languages to BOTH interface the Java runtime (like 
CPython or Perl) and be implemented entirely in Java (like Jython).

I'm sure I'm repeating something you've heard over and over, because if you do 
a Google search for JSR 223, you will not find a link to the document on the 
first page.  You will instead get links to many different discussion boards 
and sites of various open source scripting languages; and almost all messages 
and articles on the subject say close to the same thing: JSR 223 is too web 
specific and ignores some very real issues of scripting language and Java 
integration; and I agree.

But JSR 223 can easily broaden its scope to include all genearl scripting use 
cases.  It could also easily focus on a standard, core API for languages to 
access all Java services, not just servlets through a narrow interface.  It's 
a step in the right direction but it's timid step in my opinion and needs to 
go farther.

Thanks for your time,

-Michel





More information about the jdom-interest mailing list