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

These collections are often default defined as unordered collections; it’s just that people discovered over time that some were iterable even if the language docs said otherwise.


I don't think ordering and iteration are related, are they? Whether something is sortable has no impact on whether it is enumerable.


What would it even mean for a container to be ordered if you can't iterate through it?


How I think about it is if something is unordered then the iteration strategy is a question.




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

Search: