Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: type recursifs et abreviations cyclique and Co
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Cuoq Pascal <cuoq@e...>
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