Which programming language should I use?
Kevin Murphy, 3 December 2002.
My Desiderata for a language
The language should
- Have an intepreter for rapid prototyping, ease of
debugging, and maximum fun.
- Have a native code (not just byte code) compiler that produces
fast code that can be run stand-alone or be called from the
interactive environment.
- Have good support for vectors, multi-dimensional arrays,
strings,
hash tables, etc. in the standard library.
- Have a free implementation.
- Work under linux and windows
(so I can transfer code easily between my desktop and my laptop).
So I did some web searching and found lots of interesting stuff (see
below).
Some language comparisons
- Computer language
shootout benchmarks
-
An empirical comparison of C, C++, Java, Perl, Python, Rexx and Tcl
for a search/ string-processing program, Lutz Prechelt, TR 2000
- Revenge of the
Nerds, Paul Graham, 2003. Interesting discussion of C++, Java,
Lisp, Python and Perl.
- Why I
hate (programming language) advocacy, by Mark-Jason Dominus (2000).
-
Religious zealotry for Python and other languages
-
Keith Waclena's programming language comparison (1997)
-
Java vs Lisp, JPL study
-
Lisp's macros, a response to Graham's "Beating the averages" article
-
Numerical benchmark of C++, Java and Fortran, 4 Jan 2003
-
Lisp vs Ocaml vs C++.
-
Why Ocaml?
Comparison of Matlab, R/S/Splus, Gauss, etc.
- Comparison of
mathematical programs for data analysis,
Stefan Steinhaus, tech report, 2000.
This is a very detailed comparison of features and speed of several
interactive scientific programming environments, e.g. Matlab,
Mathematica, Splus.
- User
comparisons of several interactive langauges
- Matlab
vs R discussion, April 2004.
Note: you can
call matlab from R and vice versa.
-
Short but sensible comparison of Splus and Matlab, 2003.
- Econometric
programming environments: Gauss, Ox and S-PLUS,
Francisco Cribari-Neto.
J. of Applied Econometrics, 12(1):77-89, 1997
Ox can not be used interactively, and has a C-style syntax (it even
requires users to pre-declare variables!). Its only advantage is speed.
S-Plus has tons of features and good documentation, but is slow.
Gauss is somewhere in between.
- MATLAB as an econometric
programming environment,
Francisco Cribari-Neto and Mark J. Jensen.
J. of Applied Econometrics, 12(6):735-432, 1997.
The basic conclusion is that Matlab has excellent graphics and
sparse-matrix facilities, but is slower than Gauss/Ox (especially on
code
with loops), and has few statistical routines built-in (one must buy the
stats toolbox).
- R: Yet another econometric
programming environment,
Francisco Cribari-Neto and S. Zarkos.
J. of Applied Econometrics, 14(3):319-329, 1999.
The basic conclusion is that R is much faster than Splus on
code with loops, but a little bit slower on vectorized code. (Gauss/
Ox is much faster than both; in my experience, R and Matlab have about
the same speed.)
However, R has much better memory management than Splus, and R is free. Otherwise, R/S/Splus
are essentially the same.
- Scilab, an open source alternative to
Matlab.
- Octave, an open source
version of matlab.
-
Lush,
Yann Le Cun's lisp-like Matlab replacement.
It seems to meet many of the desiderata above (although it does not
work on windows), and has proven adequate for real time computer
vision and large-scale machine learning experiments.
-
PVwave,
described by John Fisher as "Matlab on steroids".
It is designed for data analysis and visualization.
-
R,
an open-source version of S.
Click here for a list of pros and
cons for rewriting BNT in R.
Click here for a new
project to implement a graphical models library in R.