Answer the question
In order to leave comments, you need to log in
How to overtake structure in map?
Good afternoon!
For three hours now I have been trying to figure out what kind of map this type is. As far as I understood from the Internet - an array in which instead of a numerical index - anything.
And for some reason I am convinced that describing the map is much easier and more correct than stirring up nested structures. Can someone suggest/explain/poke where to read?
Answer the question
In order to leave comments, you need to log in
I correctly understood the question: are you comparing map (hash table) with nested structures?
If so, do not confuse green and soft.
Mappings (aka maps) are used as unordered key-value stores with fast lookups.
Nested structures assume a hierarchy of functionality and data.
Slices (or arrays) of structures are ordered lists of functionality and data.
Not really, slices, mappings, and functions can't be keys. proof
inside map
What are the persuasive arguments? Each task has its own data type, somewhere map is better, somewhere nested structures
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question