|
|
|
|
|
by entity345
2667 days ago
|
|
I'm very surprised by those vitriolic comments... Really I have never seen print change the order of the data it is given (that's manipulating, indeed) for the sake of what seems to be laziness. If there is a real need for sorted iteration then it should be external to print, possibly a new API of maps. |
|
For printing purposes that means that it doesn't matter which order you print something out in. ANY order is equally correct. So you might as well choose the one that makes the most sense to human eyes, which is to print them out ordered alphabetically on the keys.
Just because the printing function is choosing alphabetical order to print things out in, it's not "manipulating" anything. Literally nothing about the map changes.