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 PAA13461 for caml-redistribution; Sun, 24 Jan 1999 15:40:18 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA02931 for ; Sat, 23 Jan 1999 11:46:30 +0100 (MET) Received: from post.tepkom.ru (relay.tepkom.ru [195.9.240.162]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id LAA17642; Sat, 23 Jan 1999 11:46:27 +0100 (MET) Received: from localhost (msk@localhost) by post.tepkom.ru (8.8.7/8.8.7) with ESMTP id NAA09128; Sat, 23 Jan 1999 13:47:10 +0300 Date: Sat, 23 Jan 1999 13:47:10 +0300 (MSK) From: Anton Moscal To: Pierre Weis cc: Brian Rogoff , caml-list@inria.fr Subject: Re: Array interface question In-Reply-To: <199901221921.UAA10085@pauillac.inria.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: weis 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? > [...] > > > > -- 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). Other reason for immediate arrays initialization is garbage collection, I think. Anton