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 KAA14345; Fri, 4 Oct 2002 10:32:52 +0200 (MET DST) 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 KAA14279 for ; Fri, 4 Oct 2002 10:32:52 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g948Wp528343 for ; Fri, 4 Oct 2002 10:32:51 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id KAA07877 for caml-list@inria.fr; Fri, 4 Oct 2002 10:32:51 +0200 Date: Fri, 4 Oct 2002 10:32:51 +0200 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] syntaxes Message-ID: <20021004103251.A7826@verdot.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from kgergely@mlabdial.hit.bme.hu on Fri, Oct 04, 2002 at 09:40:47AM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Fri, Oct 04, 2002 at 09:40:47AM +0200, Kontra, Gergely wrote: > I've seen so far, that there are at least 2 version of syntax exists. > My only question is: why has ocaml different syntax than standard ML at > the places, where ocaml is not more efficient. We could answer: why "standard ML" has a different syntax than Caml? Caml is as old as standard ML: we did not decide to differentiate. Don't be fixed on the word "standard" which is just a "marketting" term, not a real standardization. Well, if you prefer standard ML syntax, do it! and compile your programs by: ocamlc -pp "camlp4 pa_sml.cmo pr_dump.cmo" -c foo.ml And why not Scheme syntax: ocamlc -pp "camlp4 pa_scheme.cmo pr_dump.cmo" -c foo.ml > Sometimes SML solution is shorter. For example? > Records in ocaml is not optimal. From a record creation, the type > should be obvious, so labels can be reused in different type of > records. That's right: but this difference is not just syntax: it has big consequences on typing. -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- 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