Fast and reliable programs with OCaml

Oasis

Article from Issue 163/2014
Author(s):

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

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
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.

  • File Comparison

    With support for more than 60 file formats, diffoscope extends the power of diff beyond the plain text or HTML file.

  • Highlight Learns F#

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

  • Static Code Analyzers

    Admins daily use scripts to automate tasks, generate web content, collect and parse data, and perform many other tasks. A few sophisticated tools can tell admins where script problems lurk.

comments powered by Disqus