Hi Roman,

> In fact, lots of Haskell newcomers are surprised that
> 
>   f 10 = 42
> 
> is not the same as
> 
>   n = 10
>   f n = 42

Well, yes, at the beginning I've been also surprised about this.

But allowing this seems to be even more error prone, because now you
could "bind" function arguments to values by just importing a module.


module Foo where
n = 10


module Bar where
import Foo

f n = 42


By constraining this "binding" to only the current module you would just add
an other inconsistency.



Greetings,
Daniel

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to