3 ms·
Huh? Rust is better if I ever run my program even once? Even when it takes significantly more effort to write? Hard disagree on that. > Just passing String and
by josephg 4y ago
Huh? Rust is better if I ever run my program even once? Even when it takes significantly more effort to write? Hard disagree on that.
> Just passing String and FnMut everywhere will be a lot more efficient than whatever the JS translates to on the machine.
I can’t comment on the performance of FnMut, but I’ve seen rust code run slower than the equivalent javascript because the rust code in question allocates everywhere without thinking about it (via Vec, String and Box).
In my mind, javascript and friends are good languages to build things fast. Rust is a good language to build things right. For plenty of software (eg websites), good enough is good enough.