Browse thread
[Caml-list] ocaml killer
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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 well-principled. 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, mailto:skaller@tpg.com.au snail:25/85c Wigram Rd, Glebe, NSW 2037, Australia. voice:61-2-9660-0850. Checkout Felix: http://felix.sf.net ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners