[rust-dev] do we need lambda?

Niko Matsakis niko at alum.mit.edu
Sun Dec 4 20:14:59 PST 2011


Hello,

I wanted to do a quick straw poll to ask whether we still need a lambda 
expression, given that we have blocks and named functions?  Searching 
the rust code base, I found that *every* use of lambda was of the form: 
|let foo = lambda(...) {...}| which would (in my opinion) be better 
written: |fn foo(...) {...}|.

I am not asking because I like stripping out unused expression forms, 
though I do, but rather because I am thinking about the precise design 
for unique closures (separate e-mail coming soon) and the fewer ways to 
declare closures the simpler the job becomes.


Niko


More information about the Rust-dev mailing list