Re: [rust-dev] bind syntax change proposal

2012-02-06 Thread Niko Matsakis
On 2/4/12 5:55 PM, Niko Matsakis wrote: Anyway, I am happy to update my patch to make `_` be currying (as both you and graydon preferred). I think I spoke too soon about being happy. =) I've been thinking about the patch some more and I am not sure how I feel about `_` being currying. This

Re: [rust-dev] bind syntax change proposal

2012-02-06 Thread Graydon Hoare
On 2/6/2012 10:07 AM, Niko Matsakis wrote: I've been thinking about the patch some more and I am not sure how I feel about `_` being currying. This is not because I'm opposed to a currying semantics as opposed to a closure semantics—though I'm not sure that it's really better—but because I

Re: [rust-dev] bind syntax change proposal

2012-02-04 Thread Marijn Haverbeke
First, I like this a lot. I think applying it to operators as well is definitely a good thing. I don't feel strongly about these closures needing to copy the bound values. If you consider them a syntax for currying, one would expect them to copy, but you could also look at them as a shorthand for

Re: [rust-dev] bind syntax change proposal

2012-02-04 Thread Niko Matsakis
On 2/4/12 1:50 PM, Patrick Walton wrote: Here, assuming I understand your proposal correctly, the rule is relatively simple: where there's an underscore, the lambda is always positioned before the nearest parent PrimaryExpression. But with operators, the rules become more complex. I don't know