<?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="2005/05/a75422b52de2316685268a49e63d92b7"
  from="Jean-Christophe Filliatre &lt;Jean-Christophe.Filliatre@l...&gt;"
  author="Jean-Christophe Filliatre"
  date="2005-05-27T11:12:56"
  subject="Re: [Caml-list] infix functions"
  prev="2005/05/3911702a49feba6f0afb3ecbb9030cff"
  next="2005/05/ecd76077d2f949effe289b3db4889044"
  prev-in-thread="2005/05/3405c44764e476f00f816b68d6cb19a6"
  next-in-thread="2005/05/ecd76077d2f949effe289b3db4889044"
  prev-thread="2005/05/71cd7e87cf18096774a9be24b165c5d0"
  next-thread="2005/05/0863ff06ae4cdb1a42c798a087362566"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] infix functions">
<msg 
  url="2005/05/b3e1a86c65afa1b9438f0c6828902fae"
  from="Jonathan Roewen &lt;jonathan.roewen@g...&gt;"
  author="Jonathan Roewen"
  date="2005-05-27T10:06:11"
  subject="[Caml-list] infix functions">
<msg 
  url="2005/05/3911702a49feba6f0afb3ecbb9030cff"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2005-05-27T10:54:29"
  subject="Re: [Caml-list] infix functions">
<msg 
  url="2005/05/ec338a887ac5c965576076298f0bdb53"
  from="padiolea@i..."
  author="padiolea@i..."
  date="2005-05-27T12:46:16"
  subject="Re: [Caml-list] infix functions">
<msg 
  url="2005/05/3405c44764e476f00f816b68d6cb19a6"
  from="William D. Neumann &lt;wneumann@c...&gt;"
  author="William D. Neumann"
  date="2005-05-27T14:20:06"
  subject="Re: [Caml-list] infix functions">
</msg>
</msg>
</msg>
<msg 
  url="2005/05/a75422b52de2316685268a49e63d92b7"
  from="Jean-Christophe Filliatre &lt;Jean-Christophe.Filliatre@l...&gt;"
  author="Jean-Christophe Filliatre"
  date="2005-05-27T11:12:56"
  subject="Re: [Caml-list] infix functions">
</msg>
<msg 
  url="2005/05/ecd76077d2f949effe289b3db4889044"
  from="Vincenzo Ciancia &lt;vincenzo_yahoo_addressguard-gmane@y...&gt;"
  author="Vincenzo Ciancia"
  date="2005-05-27T11:14:07"
  subject="Re: infix functions">
</msg>
</msg>
</thread>

<contents>

Jonathan Roewen writes:
 &gt; 
 &gt; For instance, the Int32 (etc) modules are horrible to use cause of the
 &gt; prefix functions. These are perfect candidates for being infix. And
 &gt; being an OS project, there are a lot of instances where we need the
 &gt; extra precision, and having to do things like add some_int32
 &gt; another_int32 complex. Especially when you have to throw in
 &gt; bitshifting, AND and OR, and other magic.

In some simple cases, it can help to insert

	let (+) = Int32.add
	let (-) = Int32.sub
	...

at the  beginning of your files  (or better to  put these declarations
within  a small  module that  you open  only when  you need  the infix
notation).  You  can even  adopt  other  notations,  such as  +!,  -!,
etc.  Only the  first  character  is used  to  determine the  operator
precedence.

Beware of the lexical issue with multiplication :-)

Hope this helps,
-- 
Jean-Christophe

</contents>

</message>

