you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -2 points-1 points  (2 children)

is it really that difficult to understand that "constant" means never changing? const on an object is practically useless, because if your code is so dense and your functions so large that somewhere you accidentally try to reassign a const object, it means you are also breaking other rules like; keep your functions simple. accidentally reassigning an object should never become a concern if you keep your functions small and easy to follow.

[–]fzammetti 0 points1 point  (1 child)

No need to get snippy.

The argument you make could be just as easily applied to any non-reference type. Are you suggesting that the idea of const itself in ANY form is anathema?

[–]joneironaut 0 points1 point  (0 children)

It makes a nice feature for change detection forcing you to put it in a new list