Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

Rust has a related concept of capturing references by default:

https://doc.rust-lang.org/rust-by-example/fn/closures/captur...



Is the comparison too far off to be useful or straight up incorrect?


It reads like an attempt to hijack the thread to make it about Rust.


Thank 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: