3 ms·
Although you can certainly go the pure functions route, I wouldn't recommend it for performance. There's a false dichotomy between functions and methods, which
by Straw 8y ago
Although you can certainly go the pure functions route, I wouldn't recommend it for performance.
There's a false dichotomy between functions and methods, which are simply (sometimes dynamically dispatched) functions with a special first argument. If you allow mutable first arguments, why not any argument?
Instead of the language deciding what's mutable and not, I'd rather have a const system like C/C++ to ensure that changes aren't happening behind the programmer's back.