At 01:32 PM 10/14/2005 +1300, Greg Ewing wrote: >Phillip J. Eby wrote: > > > Actually, it's desirable to be *able* to do it for anything. But > certainly > > for otherwise-immutable objects it can lead to aliasing issues. > >Even for immutables, it could be useful to be able to >add behaviour that doesn't mutate anything. I meant that just changing its class is a mutation, and since immutables can be shared or cached, that could lead to problems. So I do think it's a reasonable implementation limit to disallow changing the __class__ of an immutable.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4