<?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="2009/10/8f4a51ef46e423a76ca1a9b355516591"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2009-10-06T13:39:01"
  subject="Re: [Caml-list] Constructors are not functions"
  prev="2009/10/aba0d7c29944654db93a75ba9f263e53"
  next="2009/10/3e23a32f43714fe2aaa93dba667b511f"
  prev-in-thread="2009/10/3d94477a1248c4ea3e9b3796fbd96b30"
  next-in-thread="2009/10/e8e36f42040a988ae01a1722a9058a0c"
  prev-thread="2009/10/c0015c890b908f272c4dc603b1de268a"
  next-thread="2009/10/f4c2db533557676eb31a47d6e4761518"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Constructors are not functions">
<msg 
  url="2009/10/c52bdaf88a932ffd02a17cf12e7a6843"
  from="Chantal KELLER &lt;chantal.keller@w...&gt;"
  author="Chantal KELLER"
  date="2009-10-06T12:01:35"
  subject="Constructors are not functions">
<msg 
  url="2009/10/198f097943e995b4154915c479f6241d"
  from="Philippe Wang &lt;philippe.wang.lists@g...&gt;"
  author="Philippe Wang"
  date="2009-10-06T12:19:59"
  subject="Re: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/3d94477a1248c4ea3e9b3796fbd96b30"
  from="Jon Harrop &lt;jon@f...&gt;"
  author="Jon Harrop"
  date="2009-10-06T12:37:38"
  subject="Re: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/8f4a51ef46e423a76ca1a9b355516591"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2009-10-06T13:39:01"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
<msg 
  url="2009/10/e8e36f42040a988ae01a1722a9058a0c"
  from="blue storm &lt;bluestorm.dylc@g...&gt;"
  author="blue storm"
  date="2009-10-10T11:49:25"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
</msg>
</msg>
<msg 
  url="2009/10/0943a75983cb128775e51daec525fc91"
  from="David Allsopp &lt;dra-news@m...&gt;"
  author="David Allsopp"
  date="2009-10-06T12:45:10"
  subject="RE: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/9786fb19966b2a45500aaecdb3f831a9"
  from="David Allsopp &lt;dra-news@m...&gt;"
  author="David Allsopp"
  date="2009-10-06T12:46:57"
  subject="RE: [Caml-list] Constructors are not functions">
</msg>
<msg 
  url="2009/10/313b39775708cfcfea942296fb5480ba"
  from="Jim Farrand &lt;jim.farrand@g...&gt;"
  author="Jim Farrand"
  date="2009-10-06T13:14:37"
  subject="Re: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/3e23a32f43714fe2aaa93dba667b511f"
  from="Michel Mauny &lt;Michel.Mauny@i...&gt;"
  author="Michel Mauny"
  date="2009-10-06T13:50:29"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
</msg>
<msg 
  url="2009/10/aba0d7c29944654db93a75ba9f263e53"
  from="Jon Harrop &lt;jon@f...&gt;"
  author="Jon Harrop"
  date="2009-10-06T13:15:08"
  subject="Re: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/fe2ab6fd1ea44b59605e06017966efe8"
  from="David Allsopp &lt;dra-news@m...&gt;"
  author="David Allsopp"
  date="2009-10-06T14:04:08"
  subject="RE: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/7ba4d13d6fa24170cbd8758b6cd063b3"
  from="Jon Harrop &lt;jon@f...&gt;"
  author="Jon Harrop"
  date="2009-10-06T14:50:46"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
<msg 
  url="2009/10/ccb202ae118dbc3a11bb5a89174e5551"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2009-10-06T15:24:10"
  subject="Re: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/b12df86f3d2ae39913e2e3a9d6a2afd5"
  from="Jacques Garrigue &lt;garrigue@m...&gt;"
  author="Jacques Garrigue"
  date="2009-10-06T16:31:44"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
</msg>
<msg 
  url="2009/10/f264a933b70853017a592acf45adc39f"
  from="Goswin von Brederlow &lt;goswin-v-b@w...&gt;"
  author="Goswin von Brederlow"
  date="2009-10-08T12:42:14"
  subject="Re: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/2f4e4d057ce5bb361d58ef7ac98d95e5"
  from="David Allsopp &lt;dra-news@m...&gt;"
  author="David Allsopp"
  date="2009-10-09T06:29:55"
  subject="RE: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/e7f2f5d4e0ff800e2527d4e93fdbed96"
  from="Goswin von Brederlow &lt;goswin-v-b@w...&gt;"
  author="Goswin von Brederlow"
  date="2009-10-10T06:25:27"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2009/10/94e682caf3469295724fbd74aa679dbb"
  from="Gerd Stolpmann &lt;gerd@g...&gt;"
  author="Gerd Stolpmann"
  date="2009-10-06T13:13:51"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
<msg 
  url="2009/10/eef410c2123f8a267621dfdc8c2c22da"
  from="Jérémie Dimino &lt;jeremie@d...&gt;"
  author="Jérémie Dimino"
  date="2009-10-06T15:51:01"
  subject="Re: [Caml-list] Constructors are not functions">
<msg 
  url="2009/10/9b4d5d1a9bf77b85b658129d148e5d03"
  from="blue storm &lt;bluestorm.dylc@g...&gt;"
  author="blue storm"
  date="2009-10-06T21:55:17"
  subject="Re: [Caml-list] Constructors are not functions">
</msg>
</msg>
</msg>
</thread>

<contents>
On Tue, Oct 06, 2009 at 01:38:20PM +0100, Jon Harrop wrote:
&gt; On Tuesday 06 October 2009 13:19:58 Philippe Wang wrote:
&gt; &gt; Hello,
&gt; &gt;
&gt; &gt; I don't know the actual reason, but I guess it's simply a choice of
&gt; &gt; semantics.
&gt; &gt;
&gt; &gt; It woud be weird to be able to deconstruct (Bar 42) while not be able
&gt; &gt; to deconstruct (Bar) as it's not constructed.
&gt; &gt; I mean we can write (match x with Bar y -&gt; y).
&gt; &gt; If partial construction were accepted we may like to write
&gt; &gt; (match x with Bar -&gt; x) but we couldn't because Bar is like a function
&gt; &gt; then.
&gt; &gt;
&gt; &gt; With type t = A | B of int
&gt; &gt; what would be the error warning for
&gt; &gt; (match x with A -&gt; 42 | B -&gt; 43) ?
&gt; &gt;
&gt; &gt; Well, then I guess the reason is that it would be complicated to
&gt; &gt; choose some sound enough semantics for partial application of
&gt; &gt; constructors, since the solution of having to write (fun x -&gt; Bar x)
&gt; &gt; is much simpler.
&gt; 
&gt; Can you not just say that Bar in an expression is a function (fun x -&gt; Bar x)?

This is what standard ML seems to do.

Rich.

-- 
Richard Jones
Red Hat

</contents>

</message>

