DEV Community

Discussion on: Higher-Order Functions in Rust

Collapse
 
myrrlyn profile image
Alexander Payne

Rust isn’t functional; it’s just dressed like it. The ownership rules allow the compiler to prove that mut self -> Self functions and &mut self -> () methods are wholly equivalent, and therefore eliminate the need to construct a new object and destroy the old.