On 5/8/07, micha wrote: > hi, > > I have classes which have many getter/setter methods. At the moment I > use two naming schemes intermixed: get_property / set_property and > property / set_property and I don't like that very much. > I would like to integrate one camlp4 extension which allows to define > the getter and setter methods for members, to be able to write: > > obj#prob <- xxx; > print_endline obj#prob; The pa_oo extension from Jacques Garrigue does exactly this kind of things: http://www.math.nagoya-u.ac.jp/~garrigue/code/ocaml.html I attach the upgraded to 3.10 extension. > Is this a good idea to integrate camlp4 macros in my project? No in particular when using clean and simple extensions pa_oo. > If someone who might use my lib also uses a camlp4 extension, can this > lead to trouble? No since people use a compiled version of your library, so all the sugar provided by macros is gone. Regards, -- Nicolas Pouillard