Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Recursive lists
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-10-13 (11:57)
From: Alex Baretta <alex@b...>
Subject: Re: [Caml-list] About Obj
Yamagata Yoriyuki wrote:
> From: Jon Harrop <>
> Subject: Re: [Caml-list] About Obj (was Recursive lists)
> Date: Mon, 11 Oct 2004 16:33:03 +0100
>>Yes, your Obj implementation is substantially bigger, more complicated, more 
>>error prone and more costly on small lists. Just forget this whole thread 
>>ever happened and consider using a different data structure. :-)
>>Can Obj not be hidden so that people can't use it so easily?
> Yes, it would be nice to have a compiler option which disable all
> causes of the evil (Obj.magic, Array.unsafe_get, external etc).  Then
> we can control where unsafe operations are used.
> --
> Yamagata Yoriyuki

Your proposal is reasonable and sound; however, I really think Xavier 
has more important stuff to do. Consider the following issues:
1) Your request cannot be satisfied in general because you'd never dream 
of disabling the use of Obj in the standard library.
2) You can easily achieve the same behavior by using camlp4 or possibly 
a custom preprocessor which throughs an extension upon identifying calls 
to the Obj module.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: