<?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="2006/02/9214baed0e98dcabf751588485427321"
  from="David Brown &lt;caml-list2@d...&gt;"
  author="David Brown"
  date="2006-02-23T18:56:27"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?"
  prev="2006/02/51e2e002bcb0a7bc3b80d355a8f435cc"
  next="2006/02/43c9eac16d4b847d6b2f4970ed5dd958"
  prev-in-thread="2006/02/3cb262981f289a53406067bbd69f4a63"
  next-in-thread="2006/02/a95a53378601a6ef27bf04016da04957"
  prev-thread="2006/02/8f3c94deba723122c8e8a54777c4b2c3"
  next-thread="2006/02/af620428b9e5973d1b1d679cf7d0bc61"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="(int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/f908dcb156bd0fb005460b3a0e333f44"
  from="Frédéric_Gava &lt;gava@u...&gt;"
  author="Frédéric_Gava"
  date="2006-02-23T17:24:00"
  subject="(int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/de0896f18b44131131c47598d65a5179"
  from="Thomas Fischbacher &lt;Thomas.Fischbacher@P...&gt;"
  author="Thomas Fischbacher"
  date="2006-02-23T18:33:11"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
</msg>
<msg 
  url="2006/02/51e2e002bcb0a7bc3b80d355a8f435cc"
  from="Eric Cooper &lt;ecc@c...&gt;"
  author="Eric Cooper"
  date="2006-02-23T18:33:27"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/43c9eac16d4b847d6b2f4970ed5dd958"
  from="Frédéric_Gava &lt;gava@u...&gt;"
  author="Frédéric_Gava"
  date="2006-02-23T19:03:09"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/2ac136544989c9965de7889aca06ee1b"
  from="Brian Hurt &lt;bhurt@s...&gt;"
  author="Brian Hurt"
  date="2006-02-23T20:15:54"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/3848289acfe3eed7d516508d957bb91d"
  from="Frédéric_Gava &lt;gava@u...&gt;"
  author="Frédéric_Gava"
  date="2006-02-23T21:26:06"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/c6a52c8dca9745c4c16caf17b126c89b"
  from="Brian Hurt &lt;bhurt@s...&gt;"
  author="Brian Hurt"
  date="2006-02-23T21:57:23"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/e4f6b68e8494e3b0bb9337a82a869f9d"
  from="Frédéric_Gava &lt;gava@u...&gt;"
  author="Frédéric_Gava"
  date="2006-02-23T22:26:19"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/02afb32cb15cb612c47d0d5dc141db6c"
  from="Brian Hurt &lt;bhurt@s...&gt;"
  author="Brian Hurt"
  date="2006-02-23T22:50:07"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/15202f64dadd29700ecfd2c0a70cfe23"
  from="Frédéric_Gava &lt;gava@u...&gt;"
  author="Frédéric_Gava"
  date="2006-02-23T23:04:10"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2006/02/fa8024e942755bfff622daa504e0e477"
  from="Alessandro Baretta &lt;a.baretta@s...&gt;"
  author="Alessandro Baretta"
  date="2006-02-24T08:38:15"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
</msg>
<msg 
  url="2006/02/1245b24d768342c39d5fe0d071df339f"
  from="Damien Doligez &lt;damien.doligez@i...&gt;"
  author="Damien Doligez"
  date="2006-02-24T12:58:27"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
</msg>
</msg>
<msg 
  url="2006/02/3cb262981f289a53406067bbd69f4a63"
  from="Martin Jambon &lt;martin_jambon@e...&gt;"
  author="Martin Jambon"
  date="2006-02-23T19:03:46"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
</msg>
</msg>
<msg 
  url="2006/02/9214baed0e98dcabf751588485427321"
  from="David Brown &lt;caml-list2@d...&gt;"
  author="David Brown"
  date="2006-02-23T18:56:27"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/a95a53378601a6ef27bf04016da04957"
  from="Frédéric_Gava &lt;gava@u...&gt;"
  author="Frédéric_Gava"
  date="2006-02-23T19:20:18"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
</msg>
<msg 
  url="2006/02/0b3bc51e4b763cc117bce49314bdae98"
  from="Frédéric_Gava &lt;gava@u...&gt;"
  author="Frédéric_Gava"
  date="2006-02-23T19:33:24"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/551b9511c41004bfbad101cb98485026"
  from="Frédéric_Gava &lt;gava@u...&gt;"
  author="Frédéric_Gava"
  date="2006-02-23T19:41:12"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/b4d6acda6a9b61e2802db26ce8cfe28d"
  from="Jacques Garrigue &lt;garrigue@m...&gt;"
  author="Jacques Garrigue"
  date="2006-02-24T00:01:34"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/d6a42c6fd193ddcb0fc6d82618bbf2b6"
  from="Lukasz Stafiniak &lt;lukstafi@g...&gt;"
  author="Lukasz Stafiniak"
  date="2006-02-24T00:18:29"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/f29e8f26e5c09b618405f3c4af1f8e47"
  from="Jacques Garrigue &lt;garrigue@m...&gt;"
  author="Jacques Garrigue"
  date="2006-02-24T02:17:42"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/efcb861d4b61cfe98f7d51a795e43854"
  from="Alain Frisch &lt;Alain.Frisch@i...&gt;"
  author="Alain Frisch"
  date="2006-02-24T13:08:03"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/9011019f1548d4c4eb8d3228e181aa0e"
  from="Vincent Balat &lt;Vincent.Balat@p...&gt;"
  author="Vincent Balat"
  date="2006-02-25T17:41:10"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/775002c824fb8dccd1cd65d07f2ad334"
  from="Nicolas Pouillard &lt;nicolas.pouillard@i...&gt;"
  author="Nicolas Pouillard"
  date="2006-02-25T18:30:43"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/adbb2416b5591674c71751d4f1102507"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2006-02-25T19:10:57"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/03/035347eafbbed7c98f5f4f25c451def0"
  from="Nicolas Pouillard &lt;nicolas.pouillard@i...&gt;"
  author="Nicolas Pouillard"
  date="2006-03-01T12:48:36"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
</msg>
</msg>
<msg 
  url="2006/02/159398f49c4b0dc05c919326cec4e940"
  from="Christophe TROESTLER &lt;Christophe.Troestler@u...&gt;"
  author="Christophe TROESTLER"
  date="2006-02-25T23:17:15"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/03/e85422971f0d6dbe2936c813b487d443"
  from="Nicolas Pouillard &lt;nicolas.pouillard@i...&gt;"
  author="Nicolas Pouillard"
  date="2006-03-01T13:01:04"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
</msg>
</msg>
<msg 
  url="2006/02/fdb2c12e4c1c212594609ce82eaed570"
  from="Hendrik Tews &lt;tews@t...&gt;"
  author="Hendrik Tews"
  date="2006-02-27T11:14:29"
  subject="camlp4 renovation [was: [Caml-list] (int * int) &lt;&gt; int*int ?]">
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2006/02/bdac4aa5b2244cbd120789ea79be308e"
  from="Nicolas Cannasse &lt;ncannasse@m...&gt;"
  author="Nicolas Cannasse"
  date="2006-02-24T13:40:15"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/297a917656dcb71de5ca865366502383"
  from="Frédéric_Gava &lt;gava@u...&gt;"
  author="Frédéric_Gava"
  date="2006-02-24T14:44:03"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2006/02/6a5b68050a1484acd0c68d8d0e6d23f0"
  from="Sebastian Egner &lt;sebastian.egner@p...&gt;"
  author="Sebastian Egner"
  date="2006-02-24T08:29:47"
  subject="also for tagged records? [Was: Re: [Caml-list] (int * int) &lt;&gt; int*int ?]">
<msg 
  url="2006/02/1c809cfa5cccc01d014db0fa7774573f"
  from="Thomas Fischbacher &lt;Thomas.Fischbacher@P...&gt;"
  author="Thomas Fischbacher"
  date="2006-02-24T14:01:33"
  subject="Re: also for tagged records? [Was: Re: [Caml-list] (int * int) &lt;&gt; int*int ?]">
</msg>
</msg>
</msg>
<msg 
  url="2006/02/9f7a7b80203928ffe736136f261e8446"
  from="Jon Harrop &lt;jon@f...&gt;"
  author="Jon Harrop"
  date="2006-02-23T21:18:34"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
<msg 
  url="2006/02/00239c5425a51b829eb0d85f1346be85"
  from="Frédéric_Gava &lt;gava@u...&gt;"
  author="Frédéric_Gava"
  date="2006-02-23T21:32:37"
  subject="Re: [Caml-list] (int * int) &lt;&gt; int*int ?">
</msg>
</msg>
</msg>
</thread>

<contents>
On Thu, Feb 23, 2006 at 06:28:48PM +0100, Frédéric Gava wrote:

&gt; I understand that it'is force you to have a pair for A and not just a value
&gt; of type pair but why this restriction ? It is not easy to explain why
&gt; int*int &lt;&gt; (int*int).

As others have explained the represenatation is different.  The constructed
types themselves can contain multiple values (represented the same way as a
tuple).

Consider

  type a = A of int * int
         | B of (int * int)

The result of   A (3, 4)  will be a two element tuple type tagged
appropriately for 'A' (in this case 0).

The result of   B (3, 4)  will be a one element tuple type tagged for B,
with the single element referring to the two element tuple containing (3,
4).

Because tuples are generally immutable, there is little semantic
difference, but the compiler does have to keep track of which is which.  In
most cases I would guess that 'A' would be more efficient (unless there are
lots of larger constructors sharing the same tuple).

Dave

</contents>

</message>

