3 ms·
I don't dispute the usefulness of being able to control how parameters are passed, especially in a systems language. But it seems like the two ways of passing c
by twic 13y ago
I don't dispute the usefulness of being able to control how parameters are passed, especially in a systems language. But it seems like the two ways of passing could be consistently marked by syntax. They are in C, C++, and Rust, right? In Rust, if you had some type 'channel', then:
fn spam(victim: channel)
takes the channel by value (impossible in Go, and probably nonsensical anyway), whereas:
fn spam(victim: @channel)
takes a pointer to the channel.
I think the str type is currently an exception to this in Rust.