Le 12/10/2017 à 17:57, bartc a écrit :
With a const struct, you are stopped from directly modifying elements, but if an element is a pointer, nothing stops you writing to what the pointer points to, unless that has a const target too. And then you've going to have problems doing normal updates. This constness just insinuates itself everywhere.
That is not very different from the mutable/immutable concept in Python, is it ? A tuple is immutable, but if it contains a mutable object, nothing prevents you from mutating it.
Does it mean you think the mutable/immutable concept of Python is flawed? Julien -- https://mail.python.org/mailman/listinfo/python-list