Nice TWiki > Doc > LanguageComparisons > NiceVersusJython (r1.3) TWiki webs:
Dev | Doc | Main | TWiki | Sandbox
Doc . { Changes | Index | Search | Go }
[Feel free to improve things, I'm no expert, especially on Nice, but I thought this page would be nice to have. MichaelChermside - 19 Aug 2003]

[Added a few remarks in italic -- ArjanB - 20 Aug 2003]

Jython (http://www.jython.org) is an implementation of the language Python (see http://www.python.org) in Java. It runs on the JVM, and can compile to java bytecodes (like Nice). Python is a very dynamic language, with many of the same good language features of Nice.

In order of the Nice manual:

Philosophy:

Packages

Classes

Fields

[*] Not strictly true, but close enough. See "bound methods" below.

Constructors

Parametric Classes

Functions and Methods

Functions

Methods

Assertions and Contracts

Statements

Expressions

Nice has autoboxing so whenever you use as primitive as object it's converted to an Object automaticly.

Interfacing with Java

Nice methods can be called from java.

Types

Things Specific To Jython

The above is organized according to the Nice manual, but there are a few points that still need to be touched on because they are more specific to Jython than to Nice.

This is something worht trying for Nice but parsing is bit more difficult then. I like the idea of accepting both style of syntax so everyone can choose their favorite. a[b] and a[b] = c are syntactic sugar for get(a,b) and set(a,b,c) so by implementing get and set for a class you can use the "[ ]" syntax. The addition of list slicing to Nice is being discussed(suggestions welcome).


MichaelChermside

Topic NiceVersusJython . { Edit | Attach | Ref-By | Printable | Diffs | r1.5 | > | r1.4 | > | r1.3 | More }
Revision r1.3 - 20 Aug 2003 - 15:34 GMT - ArjanB
Parents: WebHome > LanguageComparisons
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.