Re:Why Python?
by silentbicycle on Saturday October 23, 2010 @09:35AM
(#1823443)
It seems to work well for Lua, though it has an explicit optimization so that dicts with consecutive integer keys are automatically stored internally as an array.
While I agree that tuples and lists could be merged, I don't think that dicts should be merges with them, too.
When I first looked at PHP I found the concept of having a unified "array" type (for arrays and hash tables) very clever. However, I quickly changed my mind.
Now I think that the array/hash unification is one of the biggest design mistakes in PHP as it provides no benefit (both have completely different use cases), but causes a lot of trouble.
A similar argument goes for ECMA Script (aka JavaScript).