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: [Caml-list] ocaml and named constants
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-05-30 (16:50)
From: Brian Rogoff <bpr@b...>
Subject: Re: [Caml-list] ocaml and named constants
On Tue, 29 May 2001, Luc Maranget wrote:
> > 
> > 	Is there any semantic reason why
> > one cannot use variables, or even expressions? Apart from
> > the obvious syntactic problem.
> Not that obvious, I think this would make pattern-matching look
> like even more complicated.
> It is good to stress on the fact that
> in match .. with p ->, p is a pattern
>   1. Some value ``whith holes''
>   2. Something we programmer and compiler know without any computation.

I read a paper on an SML extension to handle this named constant problem,
here at
Anyone know why this or some similar approach hasn't caught on? The CamlP4 
approach isn't too bad, but this seems important enough to be in the core 

This is certainly on my "wish list" for future enhancements, since there
are so many cases where named constants are useful and the current
workarounds are a bit ugly. 

-- Brian

To unsubscribe, mail  Archives: