Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It appears that since Ruby 1.9 they guarantee insertion order: 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



As 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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: