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 KAA14438 for caml-redistribution; Wed, 26 Nov 1997 10:56:28 +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 MAA23851 for ; Tue, 25 Nov 1997 12:32:59 +0100 (MET) Received: from trinquette.essi.fr (trinquette.essi.fr [157.169.3.104]) by nez-perce.inria.fr (8.8.7/8.8.5) with ESMTP id MAA14016 for ; Tue, 25 Nov 1997 12:32:55 +0100 (MET) Received: (from cuoq@localhost) by trinquette.essi.fr (8.8.8/8.8.7) id MAA03088 for caml-list@inria.fr; Tue, 25 Nov 1997 12:30:44 +0100 (MET) Date: Tue, 25 Nov 1997 12:30:44 +0100 (MET) From: Cuoq Pascal Message-Id: <199711251130.MAA03088@trinquette.essi.fr> To: caml-list@inria.fr Subject: Re: type recursifs et abreviations cyclique and Co Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-MD5: oeaev+BEoeIBbpQ+ItGbEA== Sender: weis Jason Hickey wrote : > 2. The policy imposes a needless efficiency penalty on type > abstraction. > [...] > ocaml will insert an extraneous boxing for each > occurrence of an item of type x in t. Consider an unlabeled > abstract binary tree: > > type 'a t = ('a option) * ('a option) (* abstract *) > ... > type node = X of node t > > Every node is boxed, with a space penalty that is > linear in the number of nodes. It seems to me that this is an argument for adding an optimization to ocaml, not to change the typechecking algorithm :) Pascal