caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Vitaly Lugovsky <vsl@ontil.ihep.su>
To: <leary@nwlink.com>
Cc: caml <caml-list@inria.fr>
Subject: Re: [Caml-list] Newbie: declarations
Date: Sun, 17 Jun 2001 14:08:28 +0400 (MSD)	[thread overview]
Message-ID: <Pine.LNX.4.30.0106171406290.20599-100000@ontil.ihep.su> (raw)
In-Reply-To: <20010616170909.B10922@jean>

On Sat, 16 Jun 2001 leary@nwlink.com wrote:

> Is there a way to declare a variable and not initialize it, like C?
>
> int i;
> i = 0;

 It's an almost functional language, so please avoid variables. And use
references only when you really need 'em. Refer to the Guide about
references and named tuples.

> More to the point, is there a way to declare a record variable without
> listing/initializing all the fields?  If yes, what are the default values?

 You have to initialize 'em always. 'cause you're using a strictly typed
language.

-------------------
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-06-17 10:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-17  0:09 leary
2001-06-17 10:08 ` Vitaly Lugovsky [this message]
2001-06-18  2:19   ` leary
2001-06-18 15:18     ` Remi VANICAT
2001-06-18 20:19       ` [Caml-list] Good introduction for the working programmer in Objective CAML Mattias Waldau
2001-06-18 20:35         ` Miles Egan
2001-06-18 20:49         ` leary
2001-06-17 15:33 ` [Caml-list] Newbie: declarations David Fox
2001-06-18 14:52   ` FabienFleutot
2001-06-19  8:11 ` Frédéric van der Plancke
2001-06-19 10:22   ` Sven LUTHER
2001-06-19 12:25     ` Frank Atanassow

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=Pine.LNX.4.30.0106171406290.20599-100000@ontil.ihep.su \
    --to=vsl@ontil.ihep.su \
    --cc=caml-list@inria.fr \
    --cc=leary@nwlink.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).