<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/10/978e0f49fa4d6d930a84eda296ee6e7c"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-10-29T11:39:46"
  subject="Re: [Caml-list] undocumented external ... = &quot;%identity&quot;"
  prev="2003/10/c1d88aa9ad04cea7789936b975e4db80"
  next="2003/10/669fd0c0dff2b0a039406b7cb928916d"
  prev-in-thread="2003/10/c1d88aa9ad04cea7789936b975e4db80"
  next-in-thread="2003/10/53ed181ea2d15c4df636927cc0a1c6e1"
  prev-thread="2003/10/ed044d47f888bfffb6ffeacf6d6db1b0"
  next-thread="2003/10/7efb2636e8baabcc0cb88a95c395b229"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] undocumented external ... = &quot;%identity&quot;">
<msg 
  url="2003/10/c1d88aa9ad04cea7789936b975e4db80"
  from="Stefano Zacchiroli &lt;zack@b...&gt;"
  author="Stefano Zacchiroli"
  date="2003-10-29T10:42:51"
  subject="[Caml-list] undocumented external ... = &quot;%identity&quot;">
<msg 
  url="2003/10/978e0f49fa4d6d930a84eda296ee6e7c"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-10-29T11:39:46"
  subject="Re: [Caml-list] undocumented external ... = &quot;%identity&quot;">
<msg 
  url="2003/10/53ed181ea2d15c4df636927cc0a1c6e1"
  from="Stefano Zacchiroli &lt;zack@b...&gt;"
  author="Stefano Zacchiroli"
  date="2003-10-30T19:55:51"
  subject="Re: [Caml-list] undocumented external ... = &quot;%identity&quot;">
<msg 
  url="2003/10/6f143a8ee65352584200d7f3b19c3dd7"
  from="William Lovas &lt;wlovas@s...&gt;"
  author="William Lovas"
  date="2003-10-31T07:50:31"
  subject="Re: [Caml-list] undocumented external ... = &quot;%identity&quot;">
<msg 
  url="2003/11/040e05d79a919ba9c86528abb83627d1"
  from="Stefano Zacchiroli &lt;zack@b...&gt;"
  author="Stefano Zacchiroli"
  date="2003-11-01T08:22:20"
  subject="Re: [Caml-list] undocumented external ... = &quot;%identity&quot;">
<msg 
  url="2003/11/78e8cd539dbccb9187e2f80b19967a67"
  from="Damien Doligez &lt;damien.doligez@i...&gt;"
  author="Damien Doligez"
  date="2003-11-03T14:02:15"
  subject="Re: [Caml-list] undocumented external ... = &quot;%identity&quot;">
<msg 
  url="2003/11/1f8bcb5f83d24c8fcaaeb80de79389aa"
  from="Nicolas Cannasse &lt;warplayer@f...&gt;"
  author="Nicolas Cannasse"
  date="2003-11-03T14:20:12"
  subject="Re: [Caml-list] undocumented external ... = &quot;%identity&quot;">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
From: Stefano Zacchiroli &lt;zack@bononia.it&gt;

&gt; It seems to me that the "%identity" feature, as in
&gt; 
&gt;   external unsafe_cast : 'a obj -&gt; 'b obj = "%identity"
&gt; 
&gt; is undocumented. Am I wrong? If not is there any particular reason for
&gt; so? According to http://caml.inria.fr/archives/200208/msg00034.html is
&gt; not meant to be used by the end user, but if it's better than Obj.magic
&gt; and used by lablgtk I see no reason to not mention it in the
&gt; "Interfacing C with Objective Caml" chapter of the OCaml documentation.
&gt; Maybe with a huge disclaimer ...

It is equivalent to Obj.magic, which uses the same external.
The only interest is that you can choose to give it a type more
restrictive than Obj.magic, while still being an external.
This way %identity completely disappears during compilation.

I suppose that as Obj.magic is not documented, this is not documented
either. 

Jacques Garrigue

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

