Why not Ruby?

Marek Kubica marek at xivilization.net
Fri Jan 2 03:13:34 CET 2009

On Thu, 01 Jan 2009 13:13:19 -0800, Fuzzyman wrote:

> Care to save me the effort of looking it up and tell me what Data.Map
> does that Python's dict doesn't?
> I guess if it is functional then every mutation must copy and return a
> new data structure? (Which will be much more efficient in Haskell than
> in Python - Haskell can share most of the underlying data whereas Python
> would have to create a new dict every time. At least it only stores
> references.)

Who says that it must create a whole new one? I could imagine that with a 
bit weakref code and some thought an immutable dictionary that shares 
data would be possible in Python too.


More information about the Python-list mailing list