<?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="2002/07/c2036a4fb83c16cbfab4d7aa32ec04ed"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2002-07-25T09:21:40"
  subject="Re: [Caml-list] functor question"
  prev="2002/07/5e7fdbf53ef067bd1d56aea82980c4ec"
  next="2002/07/51745bbdd0ecdc6a7a43fccfff18d61e"
  prev-in-thread="2002/07/a2eea2ec85eb7690de7274a72302113e"
  next-in-thread="2002/07/472b2ee3456de1732c8ab79ad90e48ff"
  prev-thread="2002/07/8bae1873738de0a0761c052e27155d5e"
  next-thread="2002/07/d2430a228176c32b53caed6da8161d5d"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] functor question">
<msg 
  url="2002/07/a2eea2ec85eb7690de7274a72302113e"
  from="Brian Naylor &lt;bwv211mail@y...&gt;"
  author="Brian Naylor"
  date="2002-07-24T04:26:37"
  subject="[Caml-list] functor question">
<msg 
  url="2002/07/c2036a4fb83c16cbfab4d7aa32ec04ed"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2002-07-25T09:21:40"
  subject="Re: [Caml-list] functor question">
<msg 
  url="2002/07/472b2ee3456de1732c8ab79ad90e48ff"
  from="Thorsten Ohl &lt;ohl@p...&gt;"
  author="Thorsten Ohl"
  date="2002-07-26T21:32:44"
  subject="[Caml-list] Functors, Modules and Indirections">
</msg>
</msg>
</msg>
</thread>

<contents>
&gt; Is there any efficiency difference between:
&gt; module Foo = Make (Bar) (Baz)
&gt; and
&gt; module Both = struct module Bar = Bar module Baz = Baz end
&gt; module Foo = Make (Both)
&gt; In other words, is it better to coalesce structures into a single
&gt; functor application rather than to apply multiple functors?  Do I
&gt; pay more indirection costs in the first case?  Thanks.

Actually, you pay one more indirection in the second case (Make(Both)).

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

