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

Yeah I always thought that "make everything immutable!" was partly - maybe even mostly - a workaround for the fact that it's so hard to copy data in most languages.

I agree C++ makes it too easy to accidentally copy data, but at least you can copy data!



but the only reason you want to copy data is that it makes manual memory management easier. otherwise paying a reference is almost always cheaper.




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

Search: