[Haskell-cafe] why are applicative functors (often) faster than monads? (WAS Google Summer of Code - Lock-free data structures)
KC
kc1956 at gmail.com
Sat Apr 21 01:41:56 CEST 2012
Sorry, I thought you or someone was asking why are Applicative Functors
faster in general than Monads.
Functional programming is structured function calling to achieve a result
where the functions can be evaluated in an unspecified order; I
thought Applicative Functors had the same unspecified evaluation order;
whereas, Monads could carry some sequencing of computations which has the
extra overhead of continuation passing.
Do I have that correct?
On Fri, Apr 20, 2012 at 4:05 PM, Ben <midfield at gmail.com> wrote:
> i'm not sure what your email is pointing at. if it is unclear, i
> understand the difference between applicative and monadic. i suppose the
> easy answer to why applicative can be faster than monadic is that you can
> give a more specialized instance declaration. i was just wondering if
> there was a way to make a monad recognize when it is being used
> applicatively, but that is probably hard in general.
>
> b
>
> On Apr 20, 2012, at 2:54 PM, KC wrote:
>
> > Think of the differences (and similarities) of Applicative Functors and
> Monads and the extra context that monads carry around.
> >
> >
> > --
> > --
> > Regards,
> > KC
>
>
--
--
Regards,
KC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120420/be3ec648/attachment.htm>
More information about the Haskell-Cafe
mailing list