+1
On Mon, Jul 29, 2013 at 10:40:37PM -0700, Lindsey Kuper wrote: > On Mon, Jul 29, 2013 at 4:29 PM, Wojciech Miłkowski <milkow...@gmail.com> > wrote: > > That said I wonder why the function definition has form: > > fn name(var: type, ...) -> return_type {...} > > instead of more unified: > > fn name(var: type, ...): return_type {...} > > > > Is it constructed to mimic mathematical form f(x)->y or is there other > > reason i.e. syntax ambiguity? > > There's long precedent for `->` in function type signatures in, among > other languages, Haskell, ML, and OCaml. > > In Rust, I like it better than `:` for reasons of readability -- it > visually splits up the argument and return types nicely. If it came > to a vote, my vote would be to keep it. > > Lindsey > _______________________________________________ > Rust-dev mailing list > Rust-dev@mozilla.org > https://mail.mozilla.org/listinfo/rust-dev _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev