English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] syntax foo
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-02-06 (20:41)
From: Markus Mottl <markus@o...>
Subject: Re: [Caml-list] syntax foo
On Wed, 06 Feb 2002, Lauri Alanko wrote:
> Note that the layout rule in Haskell is _optional_. You can always use
> explicit braces and semicolons and forget about indentation. So at least
> your point on code generation doesn't hold.


> Personally, I find Haskell's syntax (with or without the layout rule)
> infinitely more convenient than OCaml's. Anything that uses "end" to mark
> the end of a block is hopelessly clumsy and old-fashioned. :)

I agree that Haskell-code looks much nicer than OCaml-code. The question
is whether anybody would want to write an advanced parser for OCaml...

> The sorest lack in both the old and the revised syntax is the need for a
> let*-form, ie. a sequence of bindings, each of which is in the scope of the
> previous ones. I _so_ hate doing this:
> let foo = bar in
>   let baz = quux in
>     let fnord = fnarp in
>       ...

Well, one doesn't have to indent each line, of course. It's still a bit
painful to have all those "let"s and "in"s.

Markus Mottl

Markus Mottl                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr