Re: Array interface question

From: Jerome Vouillon (Jerome.Vouillon@inria.fr)
Date: Sun Jan 24 1999 - 16:44:03 MET


Date: Sun, 24 Jan 1999 16:44:03 +0100
From: Jerome Vouillon <Jerome.Vouillon@inria.fr>
To: David Monniaux <monniaux@clipper.ens.fr>, Liste CAML <caml-list@inria.fr>
Subject: Re: Array interface question
In-Reply-To: <Pine.GSO.4.04.9901231154460.5422-100000@brick.ens.fr>; from David Monniaux on Sat, Jan 23, 1999 at 11:57:28AM +0100

On Sat, Jan 23, 1999 at 11:57:28AM +0100, David Monniaux wrote:
> On Fri, 22 Jan 1999, Pierre Weis wrote:
>
> > > Why is there no creation function which does not take a default
> > > value for filling the array?
>
> Perhaps the solution is to have an improved implementation of the 'a
> option type, where a NULL pointer would mean "None" and anything else
> would be the element of type 'a.
>
> Is there anything wrong with this approach? [except that it could break
> some interfaced C code that relies on NULL pointers in "private" types..]

The problem is that you need to be able to differentiate None from
Some None, Some (Some None), ...

-- Jerome



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