I'm coming from functional-programming-land, so I'm quite fond of our
current scheme. These seems a bit surprising to me:

fn f() -> int { 3 }

fn g() -> int { 4 }

fn h() -> int {
  f();  // result ignored
  g(); // result returned
}

I'm probably pretty biased, but I don't think this is a complicated
rule to learn. The type checker will complain if you thought `fn f()
-> int { 3; }` returns `3`, so I expect it's something most newbies
will run into once or twice before they get the hang of it.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to