Pnuts

Pnuts

Infobox programming language
name = Pnuts

paradigm = Object-oriented, Scripting
year = 1997
developer = Toyokazu Tomatsu (Sun Japan)
latest release version = 1.2.1
latest release date = release date|2007|7|24
typing = static, dynamic, duck
implementations =
dialects =
influenced by = Java
influenced =
operating system = Cross platform (JVM)
license = Sun Public License
website = https://pnuts.dev.java.net/

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.

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:

import java.util.*; List countries = new ArrayList(); countries.add("Canada"); countries.add("Austria"); countries.add("Brazil"); Collections.sort(countries); for (Iterator it = countries.iterator(); it.hasNext()) System.out.println("Hello " + it.next());

Alternatively, the expressiveness of Pnuts could be utilized:

use("pnuts.lib") // Standard module that makes sort, println and other functions available. countries = ["Canada", "Austria", "Brazil"] sort(countries) for (country : countries) println("Hello " + country)

History

Pnuts was originally developed in 1997 by Toyokazu Tomatsu as a testing tool for Java classes. Pnuts has since been extended, mainly focusing on essential functionality required for a Java-based scripting engine, such as a module system and bytecode compiler.

External links

* [http://pnuts.org/articles/pnutsHighlights.html Quick language overview and highlights]
* [https://pnuts.dev.java.net/ Official project page]
* [http://pnuts.org/snapshot/latest/ Latest downloads and documentation]
* [http://pnuts.org/articles/pnutsQuickstart.html Language quickstart guide]
* [http://www.jroller.com/tomatsu/ Pnuts Addict: Toyokazu Tomatsu's blog (Pnuts author)]


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Pnuts — Класс языка: Объектно ориентированный, скриптовой Появился в: 1997 Релиз: 1.2.1 (24 июля 2007) …   Википедия

  • PPP1R10 — Protein phosphatase 1, regulatory (inhibitor) subunit 10, also known as PPP1R10, is a human gene.cite web | title = Entrez Gene: PPP1R10 protein phosphatase 1, regulatory (inhibitor) subunit 10| url =… …   Wikipedia

  • Java (programming language) — infobox programming language name = Java paradigm = Object oriented, structured, imperative year = 1995 designer = Sun Microsystems latest release version = Java Standard Edition 6 (1.6.0) latest release date = latest test version = latest test… …   Wikipedia

  • Groovy (programming language) — Infobox programming language name = Groovy paradigm = object oriented, scripting year = 2003 designer = JCP developer = Guillaume Laforge (Project Manager and JSR 241 Spec Lead) latest release version = 1.5.7 latest release date = release… …   Wikipedia

  • Semipalatinsk Test Site — Infobox Military Test Site name=Semipalatinsk Test Site caption=Operation First Lightning, the first Soviet atomic test map caption=The 18,000 km 2 expanse of the Semipalatinsk Test Site (indicated in red), attached to Kurchatov (along the Irtysh …   Wikipedia

  • List of Java scripting languages — This is a list of some scripting languages available for the Java platform: *the Bean Scripting Framework (BSF) *BeanShell *Frink *Groovy *Hecl *Jacl *JavaScript (via Rhino) *Jelly (Programming Language) *Joy *JRuby *Judoscript *Jython… …   Wikipedia

  • Asterix and Cleopatra — Infobox Asterix Title=Asterix and Cleopatra Frenchtitle=Astérix et Cléopâtre Story=René Goscinny Illustrations=Albert Uderzo FrenchDate=1965 EnglishDate=1969 Preceded= Asterix and the Banquet Followed= Asterix and the Big Fight | Asterix and… …   Wikipedia

  • Jock Brandis — is an author, film technician, inventor, and alleged air pirate. BiographyJock Brandis was born in the Netherlands but moved to Canada as a child. In his early twenties, he joined CUSO, the Canadian version of the Peace Corps, and was placed in… …   Wikipedia

  • PPP1CA — Protein phosphatase 1, catalytic subunit, alpha isoform, also known as PPP1CA, is a human gene. PBB Summary section title = summary text = The protein encoded by this gene is one of the three catalytic subunits of protein phosphatase 1 (PP1). PP1 …   Wikipedia

  • List of JVM languages — This list of JVM Languages comprises computer programming languages that are used to produce software that runs on the Java Virtual Machine. Some of these languages are interpreted by a Java program, and some are compiled to Java bytecode and… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”