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-21 (00:30)
From: skaller <skaller@u...>
Subject: Re: Camlp4 mysteries (was Re: On language extensions (was Re: [Caml-list] global record))
On Fri, 2006-07-21 at 01:38 +0200, Alain Frisch wrote:
> Martin Jambon wrote:
> > Otherwise it's possible to define well-disciplined syntax extensions.
> > For example, if each new syntax construct (new rule) is forced to start
> > with a unique, registered keyword and end with "end", then different
> > syntax extensions that follow this rule should play well together.
> Except that any new keyword can potentially break existing code. You'd
> need some other syntactical convention.

If you follow the rules I specified, this is not possible.

My rule is: extensions must be enabled in every file that
use them:

#syntax extension_name

Then the extension only affects files deliberately written
using the extension, so there won't be any code breakage
unless the extension itself is upgraded, or, ocaml itself
is upgraded.

John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: