Re: Obj module

From: Hendrik Tews (tews@irritatie.cs.kun.nl)
Date: Wed Jan 20 1999 - 13:03:57 MET


Date: Wed, 20 Jan 1999 13:03:57 +0100
Message-Id: <199901201203.NAA09916@irritatie.cs.kun.nl>
From: Hendrik Tews <tews@irritatie.cs.kun.nl>
To: caml-list@inria.fr
Subject: Re: Obj module
In-Reply-To: <19990120112904E.garrigue@kurims.kyoto-u.ac.jp>
 <19990120112904E.garrigue@kurims.kyoto-u.ac.jp>

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



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:18 MET