pretend that ARROWS is the first enum in the list of enums. to add a new element to the map I have to change arrows to something else. add the new element. then change arrows back. and this is only if you have an extra enum that isn’t already a key, otherwise arrows has to be last.
example. If you have exactly 2 elements and want them both to be keys the first Enum cannot be the first element.
example. If you have integers as keys. 0 cannot be the first element.
example. If you have 400 elements and want them to be in a specific order this becomes extra ridiculous.
example. imagine setting up 400 elements and you do manage to get it in the order you want. then later you decide you need to add an extra element in the middle. you literally have to delete all the elements that would come after that one and start over.
Solutions:
Drag map elements to a new position like you can with array elements. For readability.
When you add a new map element it should start blank and just throw an error if its left blank. Default values on keys makes ordering a certain way impossible.
I avoid using maps for these reasons. when sometimes they are the best option.
i’m sorry. i understand that data tables are used for this.
but you’re offering workarounds.
I don’t want a workaround. I want a solution from the devs.
I’m just complaining that these restrictions make maps a nightmare to deal with.
And i get that these restrictions are to prevent user error. but to sacrifice usability for this isn’t the answer imo. Find other ways to prevent user error.
this is the only solution, the problem is when you add a key it adds the first value as the default value. so your default value should be none and then you don’t have to reorder anything