From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA26095 for caml-redistribution; Fri, 22 Jan 1999 20:22:29 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA16508 for ; Fri, 22 Jan 1999 20:22:03 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id UAA10762; Fri, 22 Jan 1999 20:21:59 +0100 (MET) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA10085; Fri, 22 Jan 1999 20:21:59 +0100 (MET) From: Pierre Weis 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) Cc: caml-list@inria.fr In-Reply-To: from "Brian Rogoff" at Jan 22, 99 11:10:40 am X-Mailer: ELM [version 2.4 PL24 ME8] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis > 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/