From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id D1C68BC0A for ; Fri, 22 Dec 2006 12:16:53 +0100 (CET) Received: from mta1.cl.cam.ac.uk (mta1.cl.cam.ac.uk [128.232.0.15]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id kBMBGrpH003185 for ; Fri, 22 Dec 2006 12:16:53 +0100 Received: from stem.cl.cam.ac.uk ([128.232.9.62] helo=cl.cam.ac.uk) by mta1.cl.cam.ac.uk with esmtp (Exim 3.092 #1) id 1GxiOS-000133-00 for caml-list@yquem.inria.fr; Fri, 22 Dec 2006 11:16:52 +0000 To: caml-list@yquem.inria.fr Subject: Re: Caml-list Digest, Vol 18, Issue 37 In-Reply-To: Message from caml-list-request@yquem.inria.fr of "Fri, 22 Dec 2006 12:00:03 +0100." <20061222110003.D2056BC6C@yquem.inria.fr> Date: Fri, 22 Dec 2006 11:16:52 +0000 From: Peter Sewell Message-Id: X-Miltered: at concorde with ID 458BBEA5.003 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; gcaml:01 u-tokyo:01 furuse:01 gcaml:01 runtime:01 marshalling:01 marshalling:01 g'caml:01 ocaml:01 inference:01 runtime:01 equality:01 equality:01 polymorphic:01 arbitrary:01 "Till Varoquaux" wrote: >Gcaml (http://web.yl.is.s.u-tokyo.ac.jp/~furuse/gcaml/) also has types >informations at runtime. It seems to be pretty close to what has been >asked (ie simplicity of dynamically typed systems with security of >statical types). I haven't played with it, so I don't exactly know >what it does. However I do know it supposedly provides type safe >marshalling, which gets me to ask: what is the main difference between >marshalling in hashcaml and g'caml? If I recall correctly, the type equality used by GCaml is much coarser than the OCaml static type equality - for example, if you have two type definitions with isomorphic structure but different constructor names, GCaml would let you marshal at one type and unmarshal at the other. In contrast, HashCaml gets the static and dynamic type equalities much closer in sync, including taking account of abstract types. The implementations are probably also rather different: HashCaml records the results of static type inference and adds explicit type-passing for polymorphic functions, but it does not add any type information per-value at runtime, which I imagine (without checking) GCaml does, to support type analysis of arbitrary values. Peter