Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] ocaml killer
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-01-29 (17:53)
From: skaller <skaller@t...>
Subject: Re: [Caml-list] ocaml killer
On Thu, 2004-01-29 at 11:11, Martin Berger wrote:
> > A "system" includes an application-server, a GUI, a database, a window

> please allow me to compare Ocaml and Java from the lofty perspective
> of a programming language theorist. both are mixed imperative/functional
> languages (like all others). what are the *essential* differences?
> Ocaml has/Java doesn't have
>    * sum types
>    * pattern matching as destructors for sum types
>    * full function types (not restricted to first-order like java)
>    * second-order types (will be added to java)
> Java has/Ocaml doesn't have
>    * reflection (maybe in ocaml, not sure at the moment)
> there are probably other big differences, for example in the module system,
> but let's ignore those.

Java has 'inheritance is subtyping' which is bogus,
whereas Ocaml uses algebraic subtyping which is

Ocaml also has polymorphic functions, Java does not.
(virtual functins don't really count here ..:-)
I would say this is quite distinct from the typing
of the function's interface (to see this consider
a language like C++ or Felix where values are not boxed).

John Max Skaller,
snail:25/85c Wigram Rd, Glebe, NSW 2037, Australia.
voice:61-2-9660-0850. Checkout Felix:

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: