News for hackers. Stuff that matters.
Re:Functional Programming – How and Why by brundolf on Monday January 02, 2023 @12:54PM (#34221130)
In rust ! signifies invoking a macro, so it couldn't be used like this in a function name even if you wanted to. Also, Rust allows you to notate immutable/mutating/owning for each individual argument type, so there wouldn't be much point:

  fn do_thing(a_owned: Foo, b_mutating: &mut Foo, c_immutable: &Foo) {
There is a convention to separate the two kinds of functions (consume and return in some, mutate in others), but that's the only commonality

There are no comments on this comment yet.