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

The most interesting thing I’ve learned yet from this, and I’m not quite done with it, is that you can pass a constant (let) to a function, which can accept it as mutable, and therefore actually mutate data that the caller thinks cannot be mutated! I’m not sure how I feel about this.


Note that that is passing by value, so its moving/copying ownership. Its like having a immutable integer variable and copying it to a different mutable variable.




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

Search: