[Haskell-cafe] coding standard question
Erik de Castro Lopo
mle+hs at mega-nerd.com
Mon Jun 22 07:40:24 EDT 2009
Malcolm Wallace wrote:
> When I write code that shadows variable names, it is always deliberate.
> In fact, the language's lexical rules encourage shadowing, otherwise why
> have scopes at all? I think bug-introduction by the elimination of
> shadowing is much more common than bug-elimination by the same route.
I would almost agree that blindly eliminating shadowing will lead to
bugs, but they will be shallow bugs detected almost immediately.
The bugs I am particularly interested in avoiding are the difficult bugs
that seem to be intermittent, that only hit in certain rare situations
and that take ages to find.
I will gladly trade you a hundred of the first for one of the second :-).
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
More information about the Haskell-Cafe
mailing list