Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] syntaxes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] syntaxes
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