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] syntaxes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-10-04 (08:32)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] syntaxes

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

And why not Scheme syntax:
      ocamlc -pp "camlp4 pa_scheme.cmo pr_dump.cmo" -c

> 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.

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