OCAMLObjective CAML, the object-oriented, concurrent variation of the ML functional programming language.
From the Ocaml official description: Please, it is better to avoid long citation for copyright reasons. Anyway, where this text come from precisely? -- MaD70
Objective Caml belongs to the ML family of programming languages and has been implemented at INRIA Rocquencourt within the ``Cristal project'' group. Since ML's inception in the late seventies, there has been a continuous line of research at INRIA devoted to implementations and improvements of ML. Objective Caml owes a lot to the original core ML language and to our first Caml implementation (1985-1990). A new byte-coded implementation called Caml Light was developed in the early nineties. The language Caml Light is still in use, especially for education. The language was renamed Objective Caml after the incorporation of a sophisticated module system and an object-oriented layer.
As all dialects of ML, Objective Caml possesses:
- First-class functions: functions can be passed to other functions, received as arguments or returned as results.
- A powerful type system with parametric polymorphism and type inference: functions may have polymorphic types. It is possible to define a type of collections parameterized by the type of the elements, and functions operating over such collections. For instance, the sorting procedure for arrays is defined for any array, regardless of the type of its elements.
- User-definable data-types and pattern matching: the user can define new recursive data-types as a combination of record and variant types. More importantly, functions over such structures can be defined by pattern matching: a generalized case statement that allows the combination of multiple tests and multiple definitions of parts of the argument in a very compact way.
- Exceptions for error reporting and non-local control structures.
- Automatic memory management.
In addition, Objective Caml features:
- A sophisticated module system: program phrases can be grouped into structures, which can be named and nested. Signatures are type specifications for structures; they can be used to hide some of the structure components or abstract over some type components. Functors, that is, functions from structures to structures, support parameterized modules.
- An expressive class-based object-oriented layer that includes traditional imperative operations on objects and classes, multiple inheritance, binary methods, and functional updates.
The Objective Caml implementation comes with general purpose libraries (arbitrary precision arithmetics, multi-threading, a toolkit for graphical user interfaces, etc.) and a Unix-style programming environment including a replay debugger and a time profiler. Objective Caml programs can easily be interfaced with other languages, in particular with other C programs or libraries. The implementation is targeted towards separate compilation of stand-alone applications, although interactive use via a read-eval-print loop is also supported. Both compilation to byte-code (for portability) and to native assembly code (for performance) are supported. The native code compiler generates very efficient code, complemented by a fast, unobtrusive incremental garbage collector. The implementation runs on most Unix platforms (Linux, Digital Unix, Solaris, IRIX), under Windows 95 and NT, and on the Macintosh.