From: Brian Rogoff <bpr@bpr.best.vwh.net>
To: Richard Nyberg <rnyberg@it.su.se>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] let or val in objects
Date: Tue, 2 Apr 2002 04:08:32 +0000 (GMT) [thread overview]
Message-ID: <Pine.BSF.4.40.0204020404480.4684-100000@bpr.best.vwh.net> (raw)
In-Reply-To: <20020331224051.A5546@gromit.it.su.se>
One place where you may notice that lets are used is when you have a
bunch of instance variables that depend on other instance variables for
their definition. For instance this code (not checked, posting from
wife's OCamlless machine :()
class foo = object val s = "test" val l = String.length s end
won't compile because of the dependence of l on s.
This example is clearly contrived, but if you do GUI programming this sort
of situation occurs frequently.
-- Brian
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
prev parent reply other threads:[~2002-04-02 20:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-31 20:40 Richard Nyberg
2002-04-01 9:28 ` John Prevost
2002-04-01 22:54 ` james woodyatt
2002-04-02 4:08 ` Brian Rogoff [this message]
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.BSF.4.40.0204020404480.4684-100000@bpr.best.vwh.net \
--to=bpr@bpr.best.vwh.net \
--cc=caml-list@inria.fr \
--cc=rnyberg@it.su.se \
/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).