Proposal: Applicative => Monad: Call for consensus

roconnor at theorem.ca roconnor at theorem.ca
Thu Jan 6 00:29:17 CET 2011


On Wed, 5 Jan 2011, Iavor Diatchki wrote:

> Hi,
> 
> On Wed, Jan 5, 2011 at 8:04 AM, <roconnor at theorem.ca> wrote:
>       On Tue, 4 Jan 2011, Iavor Diatchki wrote:
>       In my completion monad, "join" is more efficent than "bind id"
> 
> 
> This suggests that your monad will work less efficiently if you use it with the do-notation.

No.  If I need to use fmap, there is no getting around it.  Only if I use 
"bind id" is it faster to use "join".

> Join and bind are very similar and, at least in standard Haskell code, I think that "bind" has proven to be a lot
> more useful then "join". 

AFAIU, In applicative style programming "join" has proven to be a lot more 
useful than "bind".

> Also, as I mentioned before, if people find "join" easier to define then "bind", then they can define "join", and
> then define "bind" in terms of that---I am still not convinced that we need a new method added to the Monad class.

If people find "bind" easier to define "join", then they can define 
"bind", and then define "join" in terms of that---Your argument is totally 
symetric in the terms "bind" and "join".

-- 
Russell O'Connor                                      <http://r6.ca/>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''


More information about the Libraries mailing list