From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 99954BB94 for ; Sat, 23 Jul 2005 20:49:13 +0200 (CEST) Received: from postfix3-1.free.fr (postfix3-1.free.fr [213.228.0.44]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j6NInDu6010884 for ; Sat, 23 Jul 2005 20:49:13 +0200 Received: from [192.168.0.5] (thesard.org [82.242.12.51]) by postfix3-1.free.fr (Postfix) with ESMTP id 165571734DC for ; Sat, 23 Jul 2005 20:49:13 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v733) In-Reply-To: <20050723182709.GA4076@ara.zapto.org> References: <42E2393B.5030209@inria.fr> <20050723131626.GB11661@ara.zapto.org> <200507230936.47352.Stephane.Glondu@crans.org> <20050723182709.GA4076@ara.zapto.org> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <0B94AD49-0101-404F-AFCB-FFE72B56662F@mattam.org> Content-Transfer-Encoding: quoted-printable From: Matthieu Sozeau Subject: Re: [Caml-list] How to do this properly with OCaml? Date: Sat, 23 Jul 2005 20:50:04 +0200 To: caml-list@yquem.inria.fr X-Mailer: Apple Mail (2.733) X-Miltered: at concorde with ID 42E29129.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; matthieu:01 caml-list:01 ocaml:01 berke:01 durak:01 berke:01 durak:01 unspecified:01 type-safe:01 ocaml:01 ...:98 wrote:01 wrote:01 arbitrary:01 functions:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Le 23 juil. 05 =E0 20:27, Berke Durak a =E9crit : > On Sat, Jul 23, 2005 at 09:36:47AM -0700, Stephane Glondu wrote: > >> On Saturday 23 July 2005 06:16, Berke Durak wrote: >> >>> However I was wondering how feasible it would be to have a "any : =20= >>> 'a" >>> value, that would return an (unspecified) value of any given type... >>> >> >> That seems to be dirty and would surely beak type safety. >> >> >>> This is clearly feasible for base types. >>> possible for tuples, records and functions of base types. >>> >> >> What do you mean? >> > > I mean that there could be a built-in, type-safe Ocaml function =20 > that would > yield a valid, yet arbitrary value of any type. Find an inhabitant of `type t` (the empty type). -- mattam=