5 ms·
> Note that even "=" is a statement in Go. In Python and Rust as well.
by masklinn 11y ago
> Note that even "=" is a statement in Go.
In Python and Rust as well.
- dbaupp 11y agoNitpicking: assignment is an expression that returns () in Rust, meaning `foo(a = 1, a)` is valid if foo has a signature like `fn foo(x: (), y: i32)`. However, arguments are (mostly) defined to be evaluated from left to right.