On Tue, Sep 11, 2012 at 5:50 AM, Kevin Cantu <m...@kevincantu.org> wrote: > While the destructuring / pattern matching lets might be annoying for > one-line uses, maybe they'd help with larger blocks of code: maybe the > present syntax just hasn't bothered me because I'm so used to Haskell's > pattern matching. > > I like the idea of using `let |x, y| ...`, although I wouldn't want to > overload the & for this purpose ( though we already have fn&)... But my > impression is that some much more important -- though less syntactical -- > changes may be under way with function closures right now.
Hi Kevin, Thanks for your reply. Exactly -- I based the use of '&' upon its existing use in the 'fn&' syntax in the examples. I understand that '&' is used in this syntax in contrast to '@' and '~', to indicate that the closure is borrowing pointers to variables in the enclosing scope, since the closure will live on the stack. Contributing to that borrowed/shared/unique distinction seems like a non-terrible use of '&' to me. Aside from that, I used '&' mainly because it appeared in the syntax in the examples; it's not something I was specifically advocating. I'd be interested to read more about these deeper changes to closures that are happening. Is this something discussed on the mailing list? Thanks, jb _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev