<?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/01/2e9084b6eb8b9af0a94ce04412a520d9"
  from="Jérémie Dimino &lt;jeremie@d...&gt;"
  author="Jérémie Dimino"
  date="2009-01-29T13:00:20"
  subject="Re: [Caml-list] Ocamlopt+macros, caching MetaOcaml code. Was: Conditional compilation wrt OCaml version?"
  prev="2009/01/d1e905442fb5ce55cfc4baef864b75cc"
  next="2009/01/e477bc07cc9b512fbf6cda77570439e3"
  prev-in-thread="2009/01/007b9a6049a34f1f9c3132589ab0dc87"
  next-in-thread="2009/01/2ab9cc0e7892983f6930f81e8d176fb6"
  prev-thread="2009/01/e09599b965f7f3400e85b669e98f0ce5"
  next-thread="2009/01/f5bd2d6c64c874aac998705e20700717"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Conditional compilation wrt OCaml version?">
<msg 
  url="2009/01/0a0fe39588aae49654160bac6ca678bc"
  from="David Rajchenbach-Teller &lt;David.Teller@e...&gt;"
  author="David Rajchenbach-Teller"
  date="2009-01-26T21:24:59"
  subject="Conditional compilation wrt OCaml version?">
<msg 
  url="2009/01/04c0906b6a59f1e853f494c208ff16d4"
  from="Sylvain Le Gall &lt;sylvain@l...&gt;"
  author="Sylvain Le Gall"
  date="2009-01-26T21:40:50"
  subject="Re: Conditional compilation wrt OCaml version?">
<msg 
  url="2009/01/007b9a6049a34f1f9c3132589ab0dc87"
  from="Jan Kybic &lt;kybic@f...&gt;"
  author="Jan Kybic"
  date="2009-01-29T08:44:08"
  subject="Ocamlopt+macros, caching MetaOcaml code. Was: Conditional compilation wrt OCaml version?">
<msg 
  url="2009/01/2e9084b6eb8b9af0a94ce04412a520d9"
  from="Jérémie Dimino &lt;jeremie@d...&gt;"
  author="Jérémie Dimino"
  date="2009-01-29T13:00:20"
  subject="Re: [Caml-list] Ocamlopt+macros, caching MetaOcaml code. Was: Conditional compilation wrt OCaml version?">
</msg>
</msg>
<msg 
  url="2009/01/2ab9cc0e7892983f6930f81e8d176fb6"
  from="David Rajchenbach-Teller &lt;David.Teller@e...&gt;"
  author="David Rajchenbach-Teller"
  date="2009-01-29T09:21:30"
  subject="Re: [Caml-list] Re: Conditional compilation wrt OCaml version?">
</msg>
</msg>
<msg 
  url="2009/01/92af918d7c74f305f5057380084d1039"
  from="Mikkel_Fahnøe_Jørgensen &lt;mikkel@d...&gt;"
  author="Mikkel_Fahnøe_Jørgensen"
  date="2009-01-26T22:58:32"
  subject="Re: [Caml-list] Conditional compilation wrt OCaml version?">
</msg>
</msg>
</thread>

<contents>

Jan Kybic &lt;kybic@fel.cvut.cz&gt; writes:

&gt; Good morning. I have looked at ocamlopt and it looks very useful. 
&gt; Are there any plans to include macro expansion in ocamlopt?

Right now there is no plan for that. My only intention when i started
optcomp was conditional compilation, and i made choices making it
incompatible with macro expansion.

By the way, it would be easy to transform it into a macro expansion
system.

&gt; I mean something like merging the functionality of ocamlopt and
&gt; pa_macro but without the restrictions that pa_macro places on 
&gt; where the macro can be used.

Yes, these restrictions could be bypassed because it modify directly the
stream of tokens.

The disadvantage of dealing with macros is for expressions needing to be
evaluated at compile time. For example in that case, assuming the
variable "x" is not defined:

,----
| #let y = x
|
| #if y
| ...
| #endif
`----

the error would be raised at the "#if y" line. Whereas it is raised at
the "#let y = x" line with optcomp. That is mostly why i decided not to
design it as a macro expansion system.

Jérémie

</contents>

</message>

