Re:Git is a purely functional data structure (2013)
by no_wizard on Saturday December 09, 2017 @07:18PM
(#15888954)
Python however does provide some immutable constructs as part of it’s core language (Tuples)
It also has the ability to really take any object and attach states to it at whim, including immutability.
I think that’s a better trade off than JS
Re:Git is a purely functional data structure (2013)
by masklinn on Sunday December 10, 2017 @04:50AM
(#15890710)
I think you completely missed my point. That aside,
> Python however does provide some immutable constructs as part of it’s core language (Tuples)
That doesn't really help when you're looking for persistent datastructures.
> It also has the ability to really take any object and attach states to it at whim, including immutability.
No, and if it did that would not be an advantage in this context.
I'm guessing you mean good in the sense of well-implemented (performant), but I think good in terms of interface is also very important
For instance in my experience & opinion Immutable.JS is not very fun to use regardless of its implementation, because the interface does not feel natural for the language (not that the designers can really be faulted, the user-accessible part of the language simply limits what they can do). I think a similar library for Python would have similar issues (due to Python being very statements-oriented which is antithetical to persistent data structures).