
On Mon, 2010-11-29 at 15:30 +0000, Stephen Tetley wrote:
On 29 November 2010 13:28, John Smith
wrote: fmap = map
This could be part of a legacy module, along with any other eliminated duplicated functions. Historical cruft remains in Haskell far too long; is there no desire for an occasional cleanup?
Speaking personally, I'm quite happy to have both map and (functorial) fmap.
Haskell's intention is to be a "state of the art _functional_ language", so keeping the functional core doesn't seem unwarranted to me. There is the Charity language which was "categorical" first, and "functional" second if people really want a "crystal mountain".
While duplicating methods is one side of problem the bigger problem is when you try to write as general as possible and end up with: func1 :: Pointed a => ... func2 :: Applicative a => ... func3 :: (Pointed a, Applicative a, Monad a) => ... -- Uses func1 and func2 + require monad map as (fmap :: (a -> b) -> [a] -> [b]) have it's uses even when Functor => Pointed => Applicative => Monad Regards