Computer Science Canada I fall further for O'Caml... |
Author: | wtd [ Wed Jun 16, 2004 10:27 pm ] | ||||||||||||||
Post subject: | I fall further for O'Caml... | ||||||||||||||
A trivial example to demonstrate some gorgeous code... The goal: create a precompiled library containing a mutable_point class in a Point namespace/module. point.h:
point.cpp:
main.cpp:
point.ml:
main.ml:
C++ compilation:
O'Caml compilation:
Lines of code for the c++ example: 72. Lines of code for the O'Caml example: 20. |