[rust-dev] bikeshed on closure syntax

Grahame Bowland grahame at angrygoats.net
Tue Apr 17 22:35:36 PDT 2012


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.

Cheers
Grahame

On 18 April 2012 10:46, Patrick Walton <pwalton at mozilla.com> wrote:

> Here's a little before-and-after with some of the syntax and semantic
> changes discussed (snippet from Sebastian Sylvan's raytracer [1] and
> modified slightly):
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20120418/3204c209/attachment-0001.html>


More information about the Rust-dev mailing list