* Graydon Hoare:

> (4) Statically determine the contexts in which an expression's value
> "will be used" in an outer expression, and only typecheck those
> contexts.

I think you can view this differently: there are two "if" constructs
with different typing rules and identical syntax, but the grammar
still unambiguously chooses one of them.  Kind of what Javascript does
with the "function foo() { }" notation.

> We can't think of any other options.

Force programmers to write "ignore foo()" when they want to ignore a
function result would be an option, too.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to