[Python-ideas] Wild idea about mutability
Sven R. Kunze
srkunze at mail.de
Thu Jun 2 09:55:01 EDT 2016
On 02.06.2016 15:05, Rob Cliffe wrote:
> Sure, there are many difficulties.
> This was intended to be a blue-sky idea. I would like to pose the
> question "If I had to redesign Python from scratch, would I think this
> is a good idea?"
I don't think that's an overly stupid idea. In such regard, Python
wouldn't be the first project dealing with mutability in this manner.
PostgreSQL already does.
One question I would have: would it be enforced? Or can objects designer
choose between enforced immutability and informative immutability? Or
would it be enforced inconsistently at some places where at other places
it does not matter.
To me the 100% enforced variant would be the least troublesome.
One definite advantage of broader use of immutable objects would be
optimization: using the same memory parts, re-using the same object etc.
It's not my field in computer science but other people will be able to
imagine a lot of other possibilities here.
Best,
Sven
More information about the Python-ideas
mailing list