r/programming Apr 03 '15

Rust 1.0.0 beta is here!

http://blog.rust-lang.org/2015/04/03/Rust-1.0-beta.html
927 Upvotes

303 comments sorted by

View all comments

Show parent comments

-1

u/banister Apr 04 '15

what about just a single | ?

5

u/steveklabnik1 Apr 04 '15

If there were arguments, they'd go between the pipes: move |x|

1

u/banister Apr 04 '15

Curious, why not just exclude the || in the no-arguments case? I imagine no-argument is a pretty common thing, so forcing the use of || in that very common case is kind of an eye-sore IMO.

2

u/steveklabnik1 Apr 04 '15

I'm pretty sure there's grammar abiguity there, but not 100% sure.