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
Patterns that evaluate
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-03-07 (11:15)
From: Oliver Bandel <oliver@f...>
Subject: Re: [Caml-list] Patterns that evaluate
On Thu, Feb 15, 2007 at 12:43:22PM -0800, Nathaniel Gray wrote:
> One potential "solution" to this problem for new users would be a
> compiler warning when you shadow an existing variable in an explicit
> pattern match.

Shadowing an existing "variable": isn't this the normal way how FPLs
"do it"?

It's: the inner (local) environment overwrites the outer environments
and that's, how FPLs are doing it. A new binding to a name.

Should all re-bindings be worth a warning?
if not: which should create a warning, which not?

Is this necessary in pattern matches only?