From: Pierre Weis <Pierre.Weis@inria.fr>
Subject: Re: arrays and type variables...
To: firstname.lastname@example.org (Don Syme)
Date: Thu, 26 Nov 1998 16:33:18 +0100 (MET)
In-Reply-To: <39ADCF833E74D111A2D700805F1951EF0B2EF63B@RED-MSG-06> from "Don Syme" at Nov 25, 98 05:57:03 am
> Shouldn't "[|  |]" count as a value??
> bash$ ocaml
> Objective Caml version 2.00
> # let x = [|  |];;
> val x : '_a list array = [||]
No, we can't, since it is equivalent to create a polymorphic reference
(you just have to put the value into a list and to assign this list to
the vector). This would break the type system's safety theorem: it
would lead to ``bus errors''.
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:17 MET