I recently completed the course Introduction to Julia (for programmers). However, in the lecture titled Data Structures, there was a part where it was shown how to add an entry to a dictionary. Now suppose we have a dictionary like the following:
myphonebook = Dict("Jenny" => "867-5309", "Ghostbusters" => "555-2368")
and suppose we want to add one more entry and thus, we may write it as:
myphonebook["Kramer"] = "555-FILK"
I expected the modified dictionary to be like this:
Dict{String, String} with 3 entries:
"Jenny" => "867-5309"
"Ghostbusters" => "555-2368"
"Kramer" => "555-FILK"
However, in both, the lecture and on my computer, after I did the above operation, I found that my newly added element was augmented in between the last two elements:
Dict{String, String} with 3 entries:
"Jenny" => "867-5309"
"Kramer" => "555-FILK"
"Ghostbusters" => "555-2368"
I would like to know why Julia is adding my entry at another location instead of just “appending” my entry at the very end.
P.S. This question might be similar to the one asked here.