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

From: Manuel Fahndrich (maf@microsoft.com)
Date: Wed Oct 13 1999 - 18:42:29 MET DST


From: Manuel Fahndrich <maf@microsoft.com>
To: caml-list@inria.fr
Subject: RE: Proposal for study: Add a categorical Initial type to ocaml
Date: Wed, 13 Oct 1999 09:42:29 -0700

skaller wrote:

        [...]

> Like I've been saying, with option you can turn it off, with
Obj.magic, the
> implementor ought to be damned sure he's doing things right. But
with
> these special "uninitialized value" sorts of things, people like
me
> who've gotten used to good type systems keep looking over their
> shoulders because they're afraid it might turn around and bite
them in
> the butt.

                How is this different from Obj.magic? Can't that bite you
        in the ass too?

The difference is that in the first case of uninitialized values, they can
crop up anywhere in your program, since they get propagated. Using Obj.magic
within a special module such as resizable arrays confines the danger to that
module. The programmer can make sure (through extensive code reviews of a
finite piece of code) that outside the module, things cannot go awry.

-Manuel



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