28/12/2025
Why Go Maps Return Keys in Random Order
There's a good answer to this question:
So that no one gets dumb enough to depend on them being in any particular order because the order can change for reasons under the hood and out of your control.
Pragmatically speaking, this is a bad design. However, from an engineering perspective, it's a perfect one. This is the same way I like to think about OOP; yes it's really powerful, but it's not suitable enough for engineering once you get so many rules that the team should work with, that are not enforced by any means. #Go #Programming
[permlink]