caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Ian Zimmerman <itz@speakeasy.org>
To: caml-list@inria.fr (OCAML)
Subject: Re: [Caml-list] default values for record field definitions
Date: 18 Jul 2001 23:43:22 -0700	[thread overview]
Message-ID: <86u209l8qd.fsf@itz.dsl.speakeasy.net> (raw)
In-Reply-To: "Alexander V. Voinov"'s message of "Wed, 18 Jul 2001 21:13:47 -0700"


Alexander> Why not to introduce a syntax for default values of record
Alexander> fields:

Alexander> type rec1 = { attr1: type1 = val1; attr2: type2; attr3:
Alexander> type3 = val3 }

Alexander> It this case constructions of the form

Alexander> let x = { attr2 = val2 } are possible, with other fields
Alexander> filled by val1, val3.

type rec1 = { attr1: type1; attr2: type2; attr3: type3 };
let rec1_default = { attr1 = val1; attr2 = val2; attr3 = val3 } in
let x = { rec1_default with
        attr2 = val2'
         }
and ...

BTW, I couldn't find this in the manual!

-- 
Ian Zimmerman, Oakland, California, U.S.A.
EngSoc adopts market economy: cheap is wasteful, efficient is expensive.
GPG pub key: 433BA087 9C0F 194F 203A 63F7 B1B8 6E5A 8CA3 27DB 433B A087
-------------------
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


  reply	other threads:[~2001-07-19  6:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-19  4:13 Alexander V. Voinov
2001-07-19  6:43 ` Ian Zimmerman [this message]
2001-07-19 13:35   ` David Mentre
2001-07-19  7:02 ` Dmitry Bely
2001-07-19 16:20   ` Alexander V. Voinov
2001-07-20  9:42   ` FabienFleutot
2001-07-21 13:16 ` 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=86u209l8qd.fsf@itz.dsl.speakeasy.net \
    --to=itz@speakeasy.org \
    --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;
as well as URLs for NNTP newsgroup(s).