On Mon, Feb 27, 2006 at 04:42:32PM +0100, Johannes Waldmann wrote: > Implicit parameters are *evil*. They seem to simplify programs > but they make reasoning about them much harder.
Indeed. We really need some big caveats in the manual. I find a lot of new users think they are what they need and just end up frustrated and don't like to hear "Oh, you shouldn't have used those" after the fact. > To an extent, they can be simulated with type classes, > because dictionaries are also implicit (you don't see them in the code > but you see them in the type declaration - same as for implicit parameters). I think a Reader monad is the best way to do this sort of thing, converting to real parameters is as simple as 'ask' and even better yet when you realize you need something trickier like the ability to collect values or a unique name supply, stacking a WriterT or a StateT or whatever is simple after the fact. John -- John Meacham - ⑆repetae.net⑆john⑈ _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell