caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] let or val in objects
@ 2002-03-31 20:40 Richard Nyberg
  2002-04-01  9:28 ` John Prevost
  2002-04-02  4:08 ` Brian Rogoff
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Nyberg @ 2002-03-31 20:40 UTC (permalink / raw)
  To: caml-list

Hello, I'm a bit confused regarding let bindings and nonmutable vals in
objects. Are there any difference between the classes a and b? or are they
equivalent?

Like this:

class a fd =
  let is = in_channel_of_descr fd in
  object
  .
  .
  Use is somewhere
  .
  .
  end;;

class b fd =
  object
    val is = in_channel_of_descr fd
    .
    .
    Use is somewhere
    .
    .
    end;;

TIA!
	-Richard
-------------------
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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-04-02 20:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-31 20:40 [Caml-list] let or val in objects Richard Nyberg
2002-04-01  9:28 ` John Prevost
2002-04-01 22:54   ` james woodyatt
2002-04-02  4:08 ` Brian Rogoff

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).