caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Nathaniel Gray" <n8gray@gmail.com>
To: "Luca de Alfaro" <luca@dealfaro.org>
Cc: "Erik de Castro Lopo" <mle+ocaml@mega-nerd.com>,
	"Caml-list List" <caml-list@inria.fr>
Subject: Re: [Caml-list] If OCaml were a car
Date: Thu, 23 Aug 2007 19:54:58 -0700	[thread overview]
Message-ID: <aee06c9e0708231954l2b6eacd1gac229bbb0563f2ae@mail.gmail.com> (raw)
In-Reply-To: <28fa90930708212250w15ce8fdai7fa615414d0279d@mail.gmail.com>

On 8/21/07, Luca de Alfaro <luca@dealfaro.org> wrote:
> The only thing about Ocaml I mind, is that it a bit like German is, in that
> all the verbs at the end come.  And there nothing wrong is, but it for some
> strange reading makes, and it strange is that this from France comes.
>
> I still somewhat puzzled am, at reading:
>
> let f x =
>   [humonguous definition 50 lines spanning]
> in List.iter f l
>
> because the only way I make sense of this can, is by first looking at where
> f used is, and only then reading its definition.
> I much rather write would:
>
> do List.iter f l
> where f x = [humonguous definition]

Given the prevalence of List.fold and friends, I think this (the order
of arguments) is the biggest obstacle to code comprehension in OCaml.
I've even gone so far as to create my own ReList (readable list)
library:
  ReList.iter l
    (fun x -> [humongous definition] )

As others have mentioned, labels can help as well if that's an option
for you, but I find the label system to be a bit intrusive for
everyday usage.

> Maybe this problem with Ocamlp4 solvable is?

I think it already has been done once or twice with camlp4.  This and
try/finally are popular in camlp4 demos...

Cheers,
-n8

-- 
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->


  parent reply	other threads:[~2007-08-24  2:55 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-18 19:21 Richard Jones
2007-08-18 20:24 ` [Caml-list] " Jeff Meister
2007-08-18 21:32   ` Michael Vanier
2007-08-19 11:50     ` Daniel Bünzli
2007-08-19 11:59       ` Erik de Castro Lopo
2007-08-22  5:50         ` Luca de Alfaro
2007-08-22  8:13           ` Jon Harrop
2007-08-22  9:20             ` Jacques Garrigue
2007-08-24  2:54           ` Nathaniel Gray [this message]
2007-08-25 19:45             ` Oliver Bandel
2007-08-19 14:43       ` John Carr
2007-08-19 16:22         ` brogoff
2007-08-19 17:07         ` Richard Jones
2007-08-19 17:19           ` Stefano Zacchiroli
2007-08-22  6:04             ` Luca de Alfaro
2007-08-19 20:51           ` Vincent Hanquez
2007-08-21  8:05           ` David Allsopp
2007-08-21 18:33             ` Richard Jones
2007-08-19 20:30         ` Tom
2007-08-19 21:45           ` skaller
2007-08-20  3:37             ` Jon Harrop
2007-08-20  6:26               ` skaller
2007-08-20 10:00                 ` Joerg van den Hoff
2007-08-21 12:03                   ` Florian Hars
2007-08-20  6:54               ` skaller
2007-08-20 19:54       ` Oliver Bandel
2007-08-20 20:27         ` David Allsopp
2007-08-20 20:50           ` Ulf Wiger (TN/EAB)
2007-08-21 10:56             ` Joerg van den Hoff
2007-08-20 21:13           ` Oliver Bandel
2007-08-21  0:47         ` skaller
2007-08-21  9:51           ` Oliver Bandel
2007-08-21 10:30             ` skaller
2007-08-21 18:57               ` Richard Jones
2007-08-22  2:49                 ` skaller
2007-08-22 11:33                   ` Thomas Fischbacher
2007-08-21 14:46             ` Business Adoption of Ocaml [was Re: [Caml-list] If OCaml were a car] Robert Fischer
2007-08-21 15:09               ` Brian Hurt
2007-08-21 15:48           ` [Caml-list] If OCaml were a car brogoff
2007-08-19 18:15 [caml-list] " Mike Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aee06c9e0708231954l2b6eacd1gac229bbb0563f2ae@mail.gmail.com \
    --to=n8gray@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=luca@dealfaro.org \
    --cc=mle+ocaml@mega-nerd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).