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 if most programmers would have an intuition about what "_ + _ * _" means, for example.
The rules you specify are precisely what I had in mind as the more limited proposal. I was also worried about programmers being able to deduce the scope of the `_`. And no, I don't quite know what `_ + _ * _` should mean, really. =)
Anyway, I am happy to update my patch to make `_` be currying (as both you and graydon preferred). I think for now what I'll do is try to slice up my patch into pieces: for example, first the improved inference (which is good for closures in general), then maybe the syntax compiling to the same bind AST and trans as we have now, and finally get method call binds working.
Niko _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
