Pnuts
Encyclopedia
Pnuts is a dynamic scripting language for the Java platform. It is designed to be used in a dual language system with the Java programming language
. The goals of the Pnuts project are to provide a small, fast scripting language that has tight integration with the Java language. Pnuts uses syntax that is simple and friendly to Java developers, while also being very expressive.
Pnuts syntax can look very similar to Java. The following is a code sample written in Java that is also a valid Pnuts script:
Alternatively, the expressiveness of Pnuts could be utilized:
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
. The goals of the Pnuts project are to provide a small, fast scripting language that has tight integration with the Java language. Pnuts uses syntax that is simple and friendly to Java developers, while also being very expressive.
Relationship to Java
Because Java and Pnuts share the same type system, Java code can easily invoke or define Pnuts functions. Likewise, Pnuts code can easily manipulate Java objects. Pnuts code can even define Java classes. Because Pnuts compiles to Java byte codes, these classes can be used by Java just like any other class. A class written in Pnuts can even later be replaced by a class written in Java with no other code changes.Pnuts syntax can look very similar to Java. The following is a code sample written in Java that is also a valid Pnuts script:
Alternatively, the expressiveness of Pnuts could be utilized: