844715 wrote:That is the point though.
While in theory you could downcast it to a modifiable list, in practice you practically never will -- certainly not unintentionally. So a read-only view of someone's possibly modifiable structures is a common idiom, and it would be good if there was a formal
way to express it, as there is in C/C++.
I just feel much safer writing code that takes someone's (possibly mutable) structure, when I know that I can't change it by accident.Having spent a great deal of effort at one time on differentiating mutable versus non-mutable in the C++ code space my take is that it is just fluff.