Re: type recursifs et abreviations cyclique and Co

From: Cuoq Pascal (cuoq@essi.fr)
Date: Tue Nov 25 1997 - 12:30:44 MET


Date: Tue, 25 Nov 1997 12:30:44 +0100 (MET)
From: Cuoq Pascal <cuoq@essi.fr>
Message-Id: <199711251130.MAA03088@trinquette.essi.fr>
To: caml-list@inria.fr
Subject: Re: type recursifs et abreviations cyclique and Co

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



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:13 MET