Hi,

On 30/07/2013 01:29, Wojciech Miłkowski wrote:
Is it constructed to mimic mathematical form f(x)->y or is there other
reason i.e. syntax ambiguity?
I find it makes it vastly easier to read if a function shows up in a another function's signature.

  fn foo(f: &fn() -> int)

    vs

  fn foo(f: &fn(): int)


Aside from that I just want to point out that this syntax for types is consistent with Python which uses the colon as a general general indentation marker:

   def foo(bar: int) -> int:
       pass


Regards,
Armin

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to