Version française
Home     About     Download     Resources     Contact us    
Browse thread
Obj module
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Hendrik Tews <tews@i...>
Subject: Re: Obj module
Hi,

Jacques GARRIGUE writes:
   Date: Wed, 20 Jan 1999 11:29:04 +0900
   Subject: Re: Obj module
   
   From: Hendrik Tews <tews@irritatie.cs.kun.nl>
   
   > where can I find documentation on the Obj module in the standard
   > library?
   
   There is (intentionally) no documentation to this module.

Ok, I would not expect a complete documentation of this module.
But I thought it would be possible to make statements like

If in a program

    let super_inst : super_class = (sub_inst : sub_class :> super_class)

is accepted by the compiler, then it is save to do

    let re_sub = (Obj.magic(super_inst) : sub_class)

Does this hold in general, or only in the current implementation,
or not even there?

   But it shall be rather easy to understand once you read the chapter on
   interfacing with C in the reference manual, which gives lots of
   information about how values are represented physically.
   
This is true. But I wanted to use it together with object types.
And I was not able to find something about the layout of the
method suites and how method dispatch is implemented.

Bye,

Hendrik