Sunday, May 30, 2010

One Programming Language

Scala logoImage via Wikipedia
I was over at Hacker News, and came across this wonderful blog post by Babu Srinivasan: If You Had To Learn Just One Programming Language. He lists all the languages and he lists 13 criteria with which to measure them. Then he starts eliminating languages.

List 1: Common Lisp, Scheme, Fortran, Smalltalk, C, C++, Objective C, Ada, Java, Javascript, C#, D, Prolog, Perl, PHP, Python, Ruby, Groovy, Clojure, Lua, Forth, Factor, Erlang, OCaml, F#, Clean, Haskell, Scala.

List 2: Python, Ruby, Groovy, Clojure, Erlang, OCaml, F#, Clean, Haskell and Scala.

List 3: Clojure, Erlang, OCaml, Clean, Haskell and Scala.

List 4: Clojure, OCaml, Haskell/Clean and Scala.

List 5: OCaml, Haskell/Clean and Scala.

Winner: Scala.
Functions are values and values are objects. Therefore functions are objects. Unlike Java which has primitive types int, float etc, Scala is completely object oriented. Numbers, characters, booleans, functions are just objects ..... A big deal is made of duck typing in languages such as Python and Ruby. In Scala you have “Structural typing” which is Duck Typing done right. ..... Scala is a huge language with lots of features: traits, abstract types, higher order functions, closures, native threads, concurrency (Actors), xml processing, implicits, pattern matching, partial functions, monads. You can start using it right away and slowly learn about the more powerful constructs. You can easily write a DSL (Domain Specific Language) using scala...... The extensive set of Java libraries can be put to use...... Scala is much easier to learn for the majority of programmers who have been programming in the imperative style........ With Scala, you can start with imperative or object-oriented style of programming (think of it Java without the verbosity) and migrate slowly to the functional features. ....... Lift is a web framework written in Scala. You can create web apps as easily as you can do with Rails and Django but it will typically run 4 to 6 times faster, use less CPU and it will be lot more scalable.
Reblog this post [with Zemanta]

No comments: