Version française
Home     About     Download     Resources     Contact us    
Browse thread
How to do this properly with OCaml?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: james woodyatt <jhw@w...>
Subject: Re: [Caml-list] "Just say no!" campaign against Obj
On 24 Jul 2005, at 00:27, Alex Baretta wrote:
>
> At the end, I must say experiencing polymorphic recursion was well  
> worth the pain that came from using Obj.magic.

Well, you know what Timothy Leary said about teaching the young about  
drugs... the correct message to send is "Just Say Know."  I strongly  
believe this, so it was I was happy to see Xavier come out with: "For  
instance, the following implementation of 'magic' arrays will  
eventually cause the GC to crash: <elided>.  You don't understand  
why?  Then, don't use Obj.magic."

I have been known to use Obj.magic.  I understand that recursive  
modules are a new way to avoid some of the old uses for which I have  
put that construction.  Some day, I will reform my old code and make  
it safe for public review.  Still, I'm glad that Obj.magic is there  
and has the effect it does.  But I don't blame Xavier for wanting to  
ban its use in problem reports for the compiler team.


-- 
j h woodyatt <jhw@wetware.com>
markets are only free to the people who own them.