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 VAA16258; Wed, 6 Feb 2002 21:25:20 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA16430 for caml-list@pauillac.inria.fr; Wed, 6 Feb 2002 21:25:19 +0100 (MET) 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 UAA13419 for ; Wed, 6 Feb 2002 20:58:09 +0100 (MET) Received: from kruuna.Helsinki.FI (kruuna.helsinki.fi [128.214.205.14]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g16Jw8n18419 for ; Wed, 6 Feb 2002 20:58:08 +0100 (MET) Received: (from lealanko@localhost) by kruuna.Helsinki.FI (8.11.6/8.10.1) id g16Jw7e22113; Wed, 6 Feb 2002 21:58:07 +0200 (EET) Date: Wed, 6 Feb 2002 21:58:07 +0200 From: Lauri Alanko To: caml-list@inria.fr Subject: Re: [Caml-list] syntax foo Message-ID: <20020206215807.A18430@kruuna.Helsinki.FI> References: <20020205212131.GA1707@marant.org> <20020206182555.GA32204@fichte.ai.univie.ac.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020206182555.GA32204@fichte.ai.univie.ac.at>; from markus@oefai.at on Wed, Feb 06, 2002 at 07:25:55PM +0100 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Feb 06, 2002 at 07:25:55PM +0100, Markus Mottl wrote: > On Wed, 06 Feb 2002, Brian Rogoff wrote: > > The syntactic differences between Haskell and OCaml are insignificant > > beside the semantic ones. > > This is definitely not true: Haskell is sensitive to layout, which alone > makes it very different from a syntactic point of view. Though this > lets Haskell-programs look very nice to the human eye, it also makes > other things more difficult, e.g. using preprocessors or automatic code > generation. The parser is also more difficult to implement. 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. :) 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 ... Here foo occurs free in quux and baz occurs free in fnarp. So I have to write "in let" between every binding, which is annoying, as is also the nesting. I would prefer something like this: let* foo = bar; baz = quux; fnord = fnarp; in ... (Possibly even without the "in", it is also ugly.) That should be enough whining for now. Thankfully, camlp4 allows everyone to fix these issues according to their own preferences. Lauri Alanko la@iki.fi ------------------- 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