2 ms·
It appears that since Ruby 1.9 they guarantee insertion order: http://ruby-doc.org/core-2.3.0/Hash.html http://ruby-doc.org/core-2.3.0/Hash.html I guess there
by nvader 11y ago
It appears that since Ruby 1.9 they guarantee insertion order: http://ruby-doc.org/core-2.3.0/Hash.html http://ruby-doc.org/core-2.3.0/Hash.html
I guess there are two approaches to solving the problem of people using your data structures the wrong way.
Edit: wrong link
- ghayes 11y agoAs opposed to Go [0] > When iterating over a map with a range loop, the iteration order is not specified and is not guaranteed to be the same from one iteration to the next. Since Go 1 the runtime randomizes map iteration order, as programmers relied on the stable iteration order of the previous implementation. [0] https://blog.golang.org/go-maps-in-action https://blog.golang.org/go-maps-in-action