3 ms·
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 langua
by IshKebab 4y ago
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!
- adgjlsfhk1 4y agobut the only reason you want to copy data is that it makes manual memory management easier. otherwise paying a reference is almost always cheaper.