Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: qrczak@knm.org.pl (Marcin 'Qrczak' Kowalczyk)
To: caml-list@inria.fr
Subject: Re: How to cleanly encode "quasi-constants"?
Date: 1 Jul 2000 19:21:37 GMT	[thread overview]
Message-ID: <slrn8lsh61.6kk.qrczak@qrnik.knm.org.pl> (raw)

01 Jul 2000 20:01:54 +1000, Julian Assange <proff@iq.org> pisze:

> The revised syntax is cleaner, but drops so much syntactic sugar,
> that the language becomes ugly due to its verbosity.

It introduces many []'s. Haskell uses optional layout to avoid that
many brackets and separators. In OCaml it would look similar to this:

value rec iter_row f row = do
    List.iter
       (fun (_, fi) -> match row_field_repr fi with
            Rpresent (Some ty) -> f ty
            Reither _ tl _     -> List.iter f tl
            _                  -> ())
       row.row_fields
    return (match (repr row.row_more).desc with
        Tvariant row -> iter_row f row
        Tvar -> do
            Misc.may (fun (_, l) -> List.iter f l) row.row_name
            return (List.iter f row.row_bound)
        _ -> assert False)

-- 
 __("<  Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
 \__/            GCS/M d- s+:-- a23 C+++$ UL++>++++$ P+++ L++>++++$ E-
  ^^                W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t
QRCZAK                5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-



             reply	other threads:[~2000-07-02 17:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-01 19:21 Marcin 'Qrczak' Kowalczyk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-06-28 16:40 Marcin 'Qrczak' Kowalczyk
2000-06-30  8:04 ` Daniel de Rauglaudre
2000-07-01 10:01   ` Julian Assange
2000-07-01 18:52     ` Brian Rogoff
2000-06-21 19:59 Don Syme
2000-06-20 15:59 David Mentré
2000-06-22  8:41 ` Christian Rinderknecht
2000-06-22 20:46 ` Daniel de Rauglaudre
2000-06-23 14:27   ` Remi VANICAT
2000-06-26 10:19     ` Pierre Weis
2000-06-27  2:26       ` Julian Assange
2000-06-26 10:42     ` Daniel de Rauglaudre
2000-06-27 19:12       ` Brian Rogoff
2000-06-27 19:20         ` Daniel de Rauglaudre

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=slrn8lsh61.6kk.qrczak@qrnik.knm.org.pl \
    --to=qrczak@knm.org.pl \
    --cc=caml-list@inria.fr \
    /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