From: Douglas Gregor (gregod_at_[hidden])
Date: 2004-02-19 09:26:40
On Thursday 19 February 2004 09:09 am, Peter Dimov wrote:
> Douglas Gregor wrote:
> > Could you give an example of a problem with this?
> I have "prefix" currying in mind (the usual theoretical meaning of
> "currying", but please correct me if I'm wrong).
> boost::function<void(int, int)> f;
> f(2)(3); // same as f(2, 3)
> but note what happens when someone inadvertently omits a trailing argument:
> f(2); // compile-time error now, silent no-op with prefix currying
Ah, that'd be a killer. I wasn't thinking about prefix currying.
> As for f(..., _[k], ...) as a shorthand for bind(f, ..., _k, ...), you can
> do this today if you like, this isn't fc++ dependant in any way. Fact of
> the matter is that you have not, ergo, there is no user demand, ergo, this
> places the feature in the "but wouldn't it be cool if ..." category as far
> as I'm concerned.
Some demand might come from FC++ users if it's accepted and we are able to
switch over its indirect functions, but I agree.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk