Version française
Home     About     Download     Resources     Contact us    
Browse thread
Why isn't -rectypes command line option the default
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Erik de Castro Lopo <mle+ocaml@m...>
Subject: Re: [Caml-list] Re: Why isn't -rectypes command line option the default
Zheng Li wrote:

> So the main consideration is safety, though it's really fun to play with
> recursive types sometimes.

Ok, I can see why they aren't on by default, but using -rectypes on 
the whole file exposes to the whole file to these errors.

Wouldn't it be nicer to be able to specify the rectypes behaviour
per type? Maybe something like this would work:

	rec type 'a t = 'a * 'a t Lazy.t

Cheers,
Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo
+-----------------------------------------------------------+
"Mutable state is actually another form of manual memory management: every 
time you over-write a value you are making a decision that the old value is 
now garbage, regardless of what other part of the program might have been 
using it." -- Paul Johnson