From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA19683; Thu, 29 Jan 2004 18:53:13 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA20431 for ; Thu, 29 Jan 2004 18:53:11 +0100 (MET) Received: from mail4.tpgi.com.au (mail.tpgi.com.au [203.12.160.61]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id i0THr9P26049 for ; Thu, 29 Jan 2004 18:53:09 +0100 (MET) Received: from 203-219-225-179-syd-ts24-2600.tpgi.com.au (203-219-225-179-syd-ts24-2600.tpgi.com.au [203.219.225.179]) by mail4.tpgi.com.au (8.12.10/8.12.10) with ESMTP id i0THqhBb004808; Fri, 30 Jan 2004 04:52:44 +1100 Subject: Re: [Caml-list] ocaml killer From: skaller Reply-To: skaller@tpg.com.au To: Martin Berger Cc: Chet Murthy , caml-list In-Reply-To: <40184FB9.4000808@dcs.qmul.ac.uk> References: <20040127063230.GA12482@inv_machine> <200401282326.i0SNQntl004612@bismarck-chet.watson.ibm.com> <40184A2F.6040007@dcs.qmul.ac.uk> <200401290000.i0T00ntl006988@bismarck-chet.watson.ibm.com> <40184FB9.4000808@dcs.qmul.ac.uk> Content-Type: text/plain Message-Id: <1075398834.3632.20.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 30 Jan 2004 04:53:54 +1100 Content-Transfer-Encoding: 7bit X-TPG-Antivirus: Passed X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 tpg:99 2004:99 gui:01 theorist:01 first-order:01 reflection:01 subtyping:01 tpg:99 glebe:01 2037,:01 9660:01 ocaml:01 ocaml:01 nsw:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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