From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id DAA29270 for caml-redistribution; Thu, 18 Jun 1998 03:51:54 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA21014 for ; Wed, 17 Jun 1998 15:14:52 +0200 (MET DST) Received: from pelat.ac-nice.fr (pelat.ac-nice.fr [194.167.84.117]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id PAA05230 for ; Wed, 17 Jun 1998 15:14:50 +0200 (MET DST) Received: from FB ([201.6.61.2]) by pelat.ac-nice.fr (8.8.5/SCO5) with SMTP id NAA03352 for ; Wed, 17 Jun 1998 13:15:36 GMT Received: by FB with Microsoft Mail id <01BD9A03.1CEE4A80@FB>; Wed, 17 Jun 1998 15:17:59 +-200 Message-ID: <01BD9A03.1CEE4A80@FB> From: fbesnard To: "'caml-list@inria.fr'" Subject: are initial values in class fields mandatory ? (ocaml) Date: Wed, 17 Jun 1998 15:17:58 +-200 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: weis 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 "//" ) ?