You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some situation, I need to generate different result according to different order that items are inserted. But I read your code and find that you sort the key order, which generate the same result on different order. Can you change the behavior?
According to the official protobuf spec, map iteration order is undefined. To my knowledge, some implementations do implement insertion order while others (notably golang) do not.
This is something we could potentially change in the future, but you are better off using a repeated field if a particular order matters to you.
Activity
dibenede commentedon Jan 17, 2024
According to the official protobuf spec, map iteration order is undefined. To my knowledge, some implementations do implement insertion order while others (notably golang) do not.
This is something we could potentially change in the future, but you are better off using a repeated field if a particular order matters to you.