News for hackers. Stuff that matters.
Re:Go Is a Well-Designed Language by Cthulhu_ on Sunday January 12, 2025 @04:54AM (#42672422)
Maps being unordered is an intentional "feature" to prevent one of these programming adages that every bit of behaviour, every API will become something developers rely on; if a map has to be ordered, you're restricted in what implementations you can use, or forced to keep an array with the element order alongside it, again limiting performance. Most use cases of map do not rely on insertion / iteration order.

There are no comments on this comment yet.