[wg-camlp4] Meta Programming from the view of the implementaion

Gerd Stolpmann info at gerd-stolpmann.de
Wed Jan 30 19:03:49 GMT 2013


Am 30.01.2013 18:32:12 schrieb(en) Török Edwin:
> On 01/30/2013 07:07 PM, Alain Frisch wrote:
> > On 01/30/2013 05:13 PM, Leo White wrote:
> >>> Do you really mean using a single > as the closing delimiter in  
> the
> >>> first case?
> >>
> >> You're right that should really be ">>".
> >
> > Same problem:
> >
> > let ( >> ) = ( lsr ) in
> > << foo >> 2 >>
> >
> >>> >> is also a valid binary operator, by the way.
> >>>
> >>
> >> Yes, but it is also listed as a keyword, so it is probably fine to
> >> appropriate it.
> >
> > The manual says:
> >
> > ""
> > Note that the following identifiers are keywords of the Camlp4  
> extensions and should be avoided for compatibility reasons.
> >
> >     parser    <<    <:    >>    $     $$    $:
> > ""
> >
> >>> and << are really not keywords of OCaml, and I wouldn't be  
> surprised they are actually used as operators.
> 
> >> is used by OCamlnet:
> http://projects.camlcity.org/projects/dl/ocamlnet-3.5.1/doc/html-main/Uq_engines.Operators.html

I was not aware of the problem when choosing operators - I looked more  
at precedence and associativity.

I think we shouldn't make the choice dependent on individual cases.  
Just figure something out that is consistent in itself, good to read,  
and permits enough freedom.

Gerd


> 
> --Edwin
> _______________________________________________
> wg-camlp4 mailing list
> wg-camlp4 at lists.ocaml.org
> http://lists.ocaml.org/listinfo/wg-camlp4
> 
> 



-- 
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany    gerd at gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
------------------------------------------------------------


More information about the wg-camlp4 mailing list