Author gvanrossum
Recipients Mark.Shannon, corona10, erlendaasland, gvanrossum, serhiy.storchaka, shihai1991, vstinner
Date 2021-04-25.18:37:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619375867.47.0.613895842996.issue43908@roundup.psfhosted.org>
In-reply-to
Content
My main concern is that types that were immutable in previous Python versions shouldn't become mutable as a surprise side effect of making them heap types. I don't know which types have become mutable this way though.

My other concern is that the language design *intentionally* disallowed mutating built-in types (unlike some other languages that allow it, e.g. Ruby). Mutating built-in types is one of those "attractive nuisance" anti-patterns where at a small scale this often appears to be the quickest way to solve a problem, but it tends to break unrelated things in larger-scale  applications (when different libraries using such tricks collide).

(There's also a concern about mutating types that are shared between multiple interpreters, but IIUC heap types are not shared, so this shouldn't be a problem.)

Presumably we should review the list of heap types that you are proposing to make immutable (in a form more easily digestible by humans than a diff) and reach agreement on that. And perhaps the list should include information on when a type became a heap type. (Types that were always heap types probably needn't be changed.)
History
Date User Action Args
2021-04-25 18:37:47gvanrossumsetrecipients: + gvanrossum, vstinner, Mark.Shannon, serhiy.storchaka, corona10, shihai1991, erlendaasland
2021-04-25 18:37:47gvanrossumsetmessageid: <1619375867.47.0.613895842996.issue43908@roundup.psfhosted.org>
2021-04-25 18:37:47gvanrossumlinkissue43908 messages
2021-04-25 18:37:47gvanrossumcreate