[rust-dev] bikeshed on closure syntax

Brian Anderson banderson at mozilla.com
Wed Apr 18 11:31:20 PDT 2012

On 04/18/2012 06:46 AM, Niko Matsakis wrote:
> On 4/17/12 10:35 PM, Grahame Bowland wrote:
>> Hi Patrick
>> Thanks for the visual example. I prefer the old { |x| } style. It
>> might look slightly ugly but glancing upwards from a piece of code I
>> find it much easier to spot that a given pair of braces are a block
>> closure. I guess || sticks out like a pair of thumbs, which is useful.
> I have to admit, even I prefer the "|x|" to ": x {" when I see it laid
> out like that. They are much easier to spot.

Agreed. Would still be nice to have a lightweight version for one-liners.

More information about the Rust-dev mailing list