Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: On language extensions (was Re: [Caml-list] global record)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-07-20 (06:30)
From: Stefano Zacchiroli <zack@b...>
Subject: Re: On language extensions (was Re: [Caml-list] global record)
On Thu, Jul 20, 2006 at 03:16:18PM +1000, skaller wrote:
> On Wed, 2006-07-19 at 21:12 -0400, Eric Breck wrote:
> >  Such locality is a basic principle of software engineering,  
> > and in this case I don't really know how to achieve it with only a  
> > library (and not a syntax extension).
> In my opinion, the difficulty here lies in the Ocaml 
> programming model.
> Precisely as you say above regarding locality .. the syntax
> extensions should be localised. In particular, they should
> be embedded in the file that uses them -- along with
> documentation -- and not specified on the command line.
> For example
> syntax MyExtensions;;

Fully agreed. Me myself try to enforce locality of syntax extensions to
avoid possible clashes. Unfortunately handling that in large project is
really painful, since you end up in having to differentiate "clusters"
of files which need to be built with different set of camlp4 flags, and
you need to do that in Makefile.

In my mind this is asking for trouble, and the usual solution I pursue
is to avoid using syntax extensions ... a pity.


Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
zack@{,,} -%-
If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. -!-