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

From: chet@watson.ibm.com
Date: Sun Oct 10 1999 - 05:18:29 MET DST


From: chet@watson.ibm.com
Message-Id: <199910100318.XAA05256@bismarck.chet.org>
To: John Prevost <prevost@maya.com>
Subject: Re: Proposal for study: Add a categorical Initial type to ocaml
Date: Sat, 09 Oct 1999 23:18:29 -0400

I second John's point. In order to capture Java's semantics "on the
nose", you need to be able to model a slot of the T, which can contain
a "null".

Doing that by transforming Java's "T" to Caml's "T option", while
using a more-efficient representation under-the-covers, preserves the
possibility of disabling that efficiency-hack and debugging in a
cleaner environment.

Moreover, Java's semantics for variable-access is that fetching a null
value doesn't raise an exception -- only invoking a method on it
raises an exception.

So one can't use this "initial value" to model Java's "null".

Now, nobody claimed that Java's "null" was the target here, but, hey,
that's my $0.02.

--chet--



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