On Thursday, August 12, 2021 at 2:41:04 AM UTC+9 Matthias Koeppe wrote:

> The discussion of semantic innovations for the parents seems like a 
> distraction to me. Note that in Python, the distinction between the mutable 
> and immutable version of a type is usually expressed by different types: 
> list/tuple, set/frozenset; and in libraries like SymPy, 
> Matrix/ImmutableMatrix, ... Changing from mutable to immutable is done by 
> creating a new object of the immutable version of the type. So the very 
> operation "set_immutable" of Sage elements (mutating the mutability...) is 
> already out of line with Python conventions; and in fact, this is what 
> makes workaround functions like Nils' "imm" necessary if one wants to use 
> functional notation in generator expressions etc.
>

At this point, I want to advertise the ticket

https://trac.sagemath.org/ticket/32353

which aims to create parents with immutable elements  living alongside with 
parents with mutable elements. This would amount to elevate mutability to 
the level of sparsity in Sage. Depending on how we implement this, we may 
lose efficiency at some point, but I think we may implement it to be 
backward compatible.  

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/ec8cf82c-fc3a-49e0-acc3-0d89d049b4e9n%40googlegroups.com.

Reply via email to