Pro Skill (1) – Lisp

LISP

Lisp (1958) is the second-oldest high-level programming language (behind Fortran-1957). Lisp is actually a family of languages, with CommonLISP (an attempt to unify many Lisp variations) and recently Clojure.

Interchangeability of code and datamakes Lisp very easily recognisable.

  • Syntax: (f arg1 arg2 arg3) : a function f with 3 arguments.
  • Everything is written in expression. There is no difference between expression and statements.

List:

(list 1 2 ‘foo) = [1,2,foo]     //  ‘ prevents the argument to be evaluated

(list 1 2 (list 3 4)) = [1, 2, [3,4]]

Operators:

(+ 1 2 3 4) = 1+2+3+4

 

 

Clojure

Clojure is a general purpose language, it targets the JVM, and combines elements of scripting language with multithreaded environment.

Clojure compiles directly to JVM byte-code, it is a compiled language but is completely dynamic – supported at run-time.

Clojure is a dialect of LISP, and also has code-as-data character. It is predominantly a functional programming language.

– One of the great sites to learn clojure is http://www.4clojure.com/

– Intro to Clojure at http://clojure.org/getting_started

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s