On 8/30/07, Andrew Coppin <[EMAIL PROTECTED]> wrote:
> Obviously you might very well have *meant* to write x = f x. But would
> it be possible to add some kind of optional compiler warning to find
> such assignments?

The thing that convinced me to learn Haskell in the first place was
the fact that you could write x = f x. Equations where you refer to
the same variable on the left and right hand sides are the bread of
butter and mathematics, and I was really pleased to find a programming
language that let me do the same. So to me the idea of having a
warning for this is a bit like putting a sign on bottled water saying
"Warning: Contents may be wet". But that's just me. :-)

Still, it might be useful to for the compiler to warn when a newly
introduced name shadows another one.
--
Dan
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to