Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* are initial values in class fields mandatory ? (ocaml)
@ 1998-06-17 13:17 fbesnard
  1998-06-18  2:05 ` Donald Syme
  1998-06-18  6:40 ` are initial values in class fields mandatory ? (ocaml) Francois Pessaux
  0 siblings, 2 replies; 5+ messages in thread
From: fbesnard @ 1998-06-17 13:17 UTC (permalink / raw)
  To: 'caml-list@inria.fr'

I'd like to define a class in Ocaml without giving intial values to its fields. Is it possible ?

For example, as far as I've seen, a class with a int and an int list fields would look like this:

class dummy () =
	val mutable v = 0
	val mutable l = ([] : int list)
end;;


but what about a field of type t, for which there is no default value ?
i.e.

	val mutable v = ( ??? : t )


other questions:
- are documentations available in pdf (Acrobat Reader) format ?
- there is no 'per line' comment (like Ada's "--" or C++'s "//" ) ? 






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

end of thread, other threads:[~1998-06-23  0:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-17 13:17 are initial values in class fields mandatory ? (ocaml) fbesnard
1998-06-18  2:05 ` Donald Syme
1998-06-22  8:51   ` per-line comments Xavier Leroy
1998-06-23  0:24     ` Pierre Weis
1998-06-18  6:40 ` are initial values in class fields mandatory ? (ocaml) Francois Pessaux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox