What are the differences between Clojure, Scheme/Racket and Common Lisp? -
i know dialects of same family of language called lisp, differences? give overview, if possible, covering topics such syntax, characteristics, features , resources.
they have lot in common:
- dynamic languages
- strongly typed
- compiled
- lisp-style syntax, i.e. code written lisp data structures (forms) common pattern being function calls like:
(function-name arg1 arg2)
- powerful macro systems allow treat code data , generate arbitrary code @ runtime (often used either "extend language" new syntax or create dsls)
- often used in functional programming style, although have ability accommodate other paradigms
- emphasis in interactive development repl (i.e. interactively develop in running instance of code)
common lisp distinctive features:
- a powerful oop subsystem (common lisp object system)
- probably best compiler (common lisp fastest lisp according http://benchmarksgame.alioth.debian.org/u64q/which-programs-are-fastest.html although there isn't in it.....)
clojure distinctive features:
- largest library ecosystem, since can directly use java libraries
- vectors
[]
, maps{}
used standard in addition standard lists()
- in addition general usefullness of vectors , maps believe innovation makes more readable - greater emphasis on immutability , lazy functional programming, inspired haskell
- strong concurrency capabilities supported software transactional memory @ language level (worth watching: http://www.infoq.com/presentations/value-identity-state-rich-hickey)
scheme distinctive features:
- arguably simplest , easiest learn lisp
- hygienic macros (see http://en.wikipedia.org/wiki/hygienic_macro) - elegantly avoids problems accidental symbol capture in macro expansions
Comments
Post a Comment