Nu (programming language)
From Wikipedia, the free encyclopedia
This article may require cleanup to meet Wikipedia's quality standards. Please improve this article if you can. (April 2008) |
Nu | |
---|---|
Paradigm | structured, imperative, object-oriented |
Appeared in | 2007 |
Designed by | Tim Burks |
Developer | Tim Burks |
Latest release | 0.3.1/ 2008-03-24 |
Typing discipline | dynamic |
Influenced by | LISP, Objective-C, Ruby |
License | Apache License, v. 2.0 |
Website | Programming Nu |
Nu is an interpreted object-oriented programming language, with a LISP-like syntax, created by Tim Burks like an alternative scripting language to program Mac OS X through its Cocoa API.
There is also a language implementation for Linux, and Apple Inc. iPhone.
[edit] Example code
This is the Nu code which defines a simple complex numbers class.
(class KSComplex is NSObject (ivar (double) real (double) imaginary) (- initWithReal:(double) x imaginary:(double) y is (super init) (set @real x) (set @imaginary y) self) )
The example is a basic definition of a complex number (it just defines the instance variables, and a method to init the object). It evidences the similarity between the Nu code and the equivalent Object-C code; it evidences also the similarity with Ruby.