Date: Tue, 15 May 2001 14:59:21 +0200 To: Jacques Garrigue Cc: Benjamin.Monate at lri.fr, lablgtk at kaba.or.jp Subject: Re: Galde support [was: Re: Accessing labels of GTree.tree_item] Message-ID: <20010515145921.A7885 at lambda.u-strasbg.fr> References: <20010514131510.A3295 at lambda.u-strasbg.fr> <20010515181709D.garrigue at kurims.kyoto-u.ac.jp> <20010515113847.74211da1.Benjamin.Monate at lri.fr> <20010515184710E.garrigue at kurims.kyoto-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010515184710E.garrigue at kurims.kyoto-u.ac.jp>; from garrigue at kurims.kyoto-u.ac.jp on Tue, May 15, 2001 at 06:47:10PM +0900 From: Sven LUTHER Sender: Sven LUTHER On Tue, May 15, 2001 at 06:47:10PM +0900, Jacques Garrigue wrote: > From: Benjamin Monate > > > > Well, glade support for one thing is still in preliminary stage. > > > There is always work to be done... > > > > By glade support, do you mean interfacing libglade in ocaml ? > > > > I am currently writing a filter that takes a Glade xml file as input and > > outputs a set of ocaml modules where the user just has to write the > > callbacks' body. This is what glade does for C. > > > > What do you think of this approach ? > > This approach works also, but has a big drawback: you cannot edit your > files afterwards. So this is nice to start an application, but after > that you have to code by hand. Why not use ocaml's module and fiunctor capacity, and just output a functor taking the callbacks as argument, and generating the interface ? This way, you don't overwrite any user written files, and the user just has to write the callbacks by himself (maybe presenting him with an appropriate module type to take example from ?). This is one of the things you can do with ocaml that you cannot do in C. Also, you could also simply parse the existing ocaml code and just change the function that need changing, but this is more long, and not as elegant. Friendly, Sven Luther