From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2004-03-01 02:22:54
> On Sat, Feb 28, 2004 at 02:53:23PM -0500, Gennadiy Rozental wrote:
> > I do not understand need for separate notion of thunks. Why couldn't
> > just bind all function arguments using usual means?
> The "usual means" are either explicit currying or implicit currying.
> Given a 3-arg f:
> f(x) or f(x,_,_) // result is binary func
> just binds the first arg, and
> f(x,y) or f(x,y,_) // result is unary func
> just binds the first two, but clearly we can't say
> f(x,y,z) // calls f
> to bind all three, as this is the syntax to call the function now. As a
> result, the separate
> thunk3(f,x,y,z) // result is nullary func
> is used when you want to bind all N arguments and get back a nullary
> functor (a thunk).
IMO there should not be separate notion of thunk. We need built-in currying
and external currying using bind facility. That's it.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk