Re: Proposal for study: Add a categorical Initial type to ocaml

From: chet@watson.ibm.com
Date: Mon Oct 11 1999 - 00:36:30 MET DST


From: chet@watson.ibm.com
Message-Id: <199910102236.SAA17970@bismarck.chet.org>
To: William Chesters <williamc@dai.ed.ac.uk>
Subject: Re: Proposal for study: Add a categorical Initial type to ocaml
Date: Sun, 10 Oct 1999 18:36:30 -0400

I read the referenced note

[http://caml.inria.fr/pub/old_caml_site/caml-list/0967.html]

and while I agree with most of what's said there, I think that putting
the "option" attribute onto a field would reduce its value.

Specifically, it is a highly common (albeit problematic) idiom in C,
C++, Java, and other languages, to program with a pointer to X, which
is perhaps null, and is only checked late, at the point when it is
destructured somehow.

That sort of idiom would not be possible to capture -- when we fetch
the value of an "option" field, we are implicitly asking for the field
to be checked for non-null-ness.

In other words, I think that "nullability" is a useful property of
types in general, and not merely of types of fields.

--chet--



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:26 MET