Re: Array interface question

From: Pierre Weis (Pierre.Weis@inria.fr)
Date: Fri Jan 22 1999 - 20:21:59 MET


From: Pierre Weis <Pierre.Weis@inria.fr>
Message-Id: <199901221921.UAA10085@pauillac.inria.fr>
Subject: Re: Array interface question
To: bpr@best.com (Brian Rogoff)
Date: Fri, 22 Jan 1999 20:21:59 +0100 (MET)
In-Reply-To: <Pine.BSF.4.05.9901221056370.3130-100000@shell5.ba.best.com> from "Brian Rogoff" at Jan 22, 99 11:10:40 am

> Why is there no creation function which does not take a default
> value for filling the array?
[...]
>
> -- Brian

This is due to the coexistance in Caml of polymorphism and mutable
values. The system would be unsafe if we were able to allocate
polymorphic mutable values (those mutable values could be filled
afterwards with values of unrelated types, and hence would break the
homogeneous sequence nature of arrays, and then may be read back with
types unrelated to their proper types).

Hope this helps,

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/



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