4 ms·
Rust has a related concept of capturing references by default: https://doc.rust-lang.org/rust-by-example/fn/closures/capture.html https://doc.rust-lang.org/rus
by dgb23 6y ago
Rust has a related concept of capturing references by default:
https://doc.rust-lang.org/rust-by-example/fn/closures/capture.html https://doc.rust-lang.org/rust-by-example/fn/closures/captur...
- dgb23 6y agoIs the comparison too far off to be useful or straight up incorrect?
- millstone 6y agoIt reads like an attempt to hijack the thread to make it about Rust.
- dgb23 6y agoThank you for clarifying. I can see how it may come off as this. I guess this is a symptom of learning language X in our free time in combination with a "I know this" dopamine hit while being in the early learning stages. By the way I always thought of JS closing over references (instead of values) was a feature. A closure over a mutable reference or pointer essentially becomes an object interface. Otherwise defaulting to 'const' makes the intent clear.