<?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/8e30e035c3408ed133428b3777754c4d"
  from="Serge &lt;serge@s...&gt;"
  author="Serge"
  date="2003-10-08T15:57:09"
  subject="[Caml-list] Constructors as functions and tuples in constructors"
  prev="2003/10/7f88e86b9d298b383d73b6b58f84f6fb"
  next="2003/10/fe9eb2aaab78d81d8a7bbe3b3ba36dc7"
  next-in-thread="2003/10/fe9eb2aaab78d81d8a7bbe3b3ba36dc7"
  prev-thread="2003/10/e79513aa34d4347fb9f61c4d83c4e732"
  next-thread="2003/10/d04befa7beb24ef22b9d02a9066de8f7"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Constructors as functions and tuples in constructors">
<msg 
  url="2003/10/8e30e035c3408ed133428b3777754c4d"
  from="Serge &lt;serge@s...&gt;"
  author="Serge"
  date="2003-10-08T15:57:09"
  subject="[Caml-list] Constructors as functions and tuples in constructors">
<msg 
  url="2003/10/fe9eb2aaab78d81d8a7bbe3b3ba36dc7"
  from="Dan Grossman &lt;djg@c...&gt;"
  author="Dan Grossman"
  date="2003-10-08T16:07:33"
  subject="Re: [Caml-list] Constructors as functions and tuples in constructors">
<msg 
  url="2003/10/801b7b1b1823b88569425a89ac8c7458"
  from="Andreas Rossberg &lt;rossberg@p...&gt;"
  author="Andreas Rossberg"
  date="2003-10-08T16:49:13"
  subject="Re: [Caml-list] Constructors as functions and tuples in constructors">
<msg 
  url="2003/10/381db41c1fe9cbbdbe0afbb6f271d21e"
  from="Dan Grossman &lt;djg@c...&gt;"
  author="Dan Grossman"
  date="2003-10-08T17:04:56"
  subject="Re: [Caml-list] Constructors as functions and tuples in constructors">
<msg 
  url="2003/10/7e91616dcacffc47b139c28c440aa9e3"
  from="Andreas Rossberg &lt;rossberg@p...&gt;"
  author="Andreas Rossberg"
  date="2003-10-09T12:44:06"
  subject="Re: [Caml-list] Constructors as functions and tuples in constructors">
</msg>
</msg>
<msg 
  url="2003/10/7778131e9bb9dc8f0e37e810e13cd361"
  from="Alain.Frisch@e..."
  author="Alain.Frisch@e..."
  date="2003-10-08T18:28:21"
  subject="Re: [Caml-list] Constructors as functions and tuples in constructors">
<msg 
  url="2003/10/bfa15ffef4ce902d4ae1ce0139df5072"
  from="Marcin &apos;Qrczak&apos; Kowalczyk &lt;qrczak@k...&gt;"
  author="Marcin &apos;Qrczak&apos; Kowalczyk"
  date="2003-10-08T18:44:22"
  subject="Re: [Caml-list] Constructors as functions and tuples in constructors">
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2003/10/ee34acd3dffbe03f80f49fb59152a170"
  from="Michal Moskal &lt;malekith@p...&gt;"
  author="Michal Moskal"
  date="2003-10-08T16:15:10"
  subject="Re: [Caml-list] Constructors as functions and tuples in constructors">
</msg>
<msg 
  url="2003/10/897ac973c627b803ed112c8001b114a4"
  from="Nicolas Cannasse &lt;warplayer@f...&gt;"
  author="Nicolas Cannasse"
  date="2003-10-08T16:25:26"
  subject="Re: [Caml-list] Constructors as functions and tuples in constructors">
</msg>
</msg>
</thread>

<contents>

Gentlemen!

There are two features, which might it be useful to support in the 
language w/out modifying it much. And they both are about greater
generality of the language.

First, it would be nice to have constructors as functions like below:

List. map Some [17]

Second, it would also be nice not to have "the concept of constructor
arity", and treat the code below as correct:

type t = A of int * int
let _ = 
  match A (17, 0) with
    A z -&gt; match z with (x, y) -&gt; ()

Does anybody know, whether this is possible? Or, if not, what are the
prohibiting reasons?

-------------------------------------------------------------------------------
 Serge S. Bityukov, Moscow State University, Dept of Mechanics and Mathematics

-------------------
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>

