Immutable containers have nice subtype relationships: arrays <= ordered dictionaries <= unordered maps <= weak maps <= functions.
-
-
Replying to @TimSweeneyEpic
these relationships are not immediately obvious to me. how does e.g. an array relate to an ordered dict?
1 reply 0 retweets 0 likes -
Replying to @paniq
An array is an ordered dictionary in which the keys are consecutive natural numbers 0..length.
3 replies 0 retweets 0 likes -
Replying to @TimSweeneyEpic @paniq
A dictionary is a map in which the keys appear in order. A map is a weak map in which the keys are user-visible.
2 replies 0 retweets 2 likes
Replying to @TimSweeneyEpic @paniq
Ths holds only because of immutability, thus we compare by-value (rather than by-reference). Covariance is our friend.
12:02 PM - 8 Jan 2017
0 replies
0 retweets
2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.