Browse thread
Re: Proposal for study: Add a categorical Initial type to ocaml
- chet@w...
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 1999-10-10 (20:12) |
From: | chet@w... |
Subject: | Re: Proposal for study: Add a categorical Initial type to ocaml |
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--