From: fbesnard <fbesnard@ac-nice.fr>
To: "'caml-list@inria.fr'" <caml-list@inria.fr>
Subject: are initial values in class fields mandatory ? (ocaml)
Date: Wed, 17 Jun 1998 15:17:58 +-200 [thread overview]
Message-ID: <01BD9A03.1CEE4A80@FB> (raw)
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 "//" ) ?
next reply other threads:[~1998-06-18 1:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-17 13:17 fbesnard [this message]
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
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=01BD9A03.1CEE4A80@FB \
--to=fbesnard@ac-nice.fr \
--cc=caml-list@inria.fr \
/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