PNuts: scripting language for JAVA

PNuts: scripting language for JAVA contained in the aritcle

PNuts: scripting language for JAVA contained in the article, Techical introduction to JAVA and Jini (Swing, JDBC, PNUTS, Java Beans, EJB and Java Script)

This paper introduces a script language Pnuts that utilizes the functionalities of Java and can be easily used from Java programs. The language can be used to help Java programs be more flexible and simple.

 

2. Why Script Language ?

The Java language is a compilation-based language, that is, you have to compile source code before an execution. Although we can write flexible Java programs combining object oriented techniques and class loader, Users still need to make programs more dynamic without re-compilation. The reason for this is that programs can just choose classes and methods dynamically with a bare Java environment. With a scripting language, it would be possible to define a new sequence of object manipulations at runtime.

If so, why is there a need for a new language? Someone may claim that the script language should not be a different language. Besides, there are many simple and dynamic languages used widely; e.g. Scheme, Perl, etc. Such languages could be used to access the Java API.

But the Java language is too complex to be used as a script language, while this script language is easy and simple to use and learn. A good script language should not have too many functionalities in order to be easy to learn. Also, other dynamic languages were not designed to access the Java API. It is necessary to introduce a new syntax (language) to enable brief description for access to the Java APIs. Coupled tightly with Java, it can keep the script language simple and easy to learn.

 

3. Design Goal

* Simple interface to manipulate Java objects
* Can be called easily from Java programs
* Allows dynamic evaluation
* Smooth interface to AWT
* 100% Pure Java

你可能感兴趣的:(language)