Fast and reliable programs with OCaml


Article from Issue 163/2014

Static typing, type checking, and low memory usage make this easy-to-learn language a strong candidate for application development.

OCaml is a statically typed programming language with a focus on correctness and speed. First released in 1996 as "Objective Caml," OCaml extended the older Caml language with object-oriented features. OCaml [1] is now mature, stable, and well documented.

It supports both functional and imperative programming styles, making it a good choice for Python, C, or Java programmers interested in writing more reliable software.

Syntax Basics

OCaml's syntax can look a little alien at first. For example, here's a complete OCaml program:


Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Batsh

    Batsh kills two birds with one stone: Programs written in this language can be compiled both as Linux Bash scripts and Windows batch files.

  • Helma

    The powerful Helma application server brings new powers to the JavaScript language. We'll show you how to use Helma to build a simple RSS reader.

  • Highlight Learns F#

    The new version of Highlight, the software that highlights numerous program codes in color, supports amongst other languages, F#.

  • MLDonkey

    The multi-network MLDonkey client gives users access to all the major file sharing networks. We’ll show you how to set up MLDonkey and how you can control the MLDonkey client with a KDE front end called KMLDonkey.

  • Go Programming

    The Go programming language combines type safety with manageable syntax and an extensive library. We take you through a programming example.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95