« 加拿大DC使馆签证纪行 | Main | Parking in DC »

March 14, 2006

Differences between OCaml and Standard ML/NJ

http://www.cs.berkeley.edu/~necula/autded/project/project.html

· Many small syntactic differences. Hard to say if for better or worse. What is worse however is the very poor parser that will basically tell you that there is a syntax error with no other help to figure out why.

· Mutable records. Very convenient.

· Objects and classes (although the project is not setup to use them)

· Nice assert statement that reports the position in the program of an assertion failure

· Significant differences in the standard library.

· A debugger with backstep capability (works on Unix/Linux only and is integrated with Emacs). You can easily do without this.

· Good integration with C

· Good profiler

· Faster compilation and reasonably fast compiled code

· Not quite as powerful of a compilation manager

· Very portable in its bytecode incarnation. A few platforms (e.g, x86) have native compilers as well. but don't be afraid of using the bytecode. It is only 2-3 times slower than the native code version.

Also see the Comp.Lang.ML FAQ, http://user.it.uu.se/~jenso/programming/sml_vs_ml.txt, and http://www.ps.uni-sb.de/~rossberg/SMLvsOcaml.html for syntactic differences.

Posted by Roy at March 14, 2006 11:51 AM

Comments

Post a comment








Remember Me?