Dictionary updated?
-
If I have an array as a value for a dictionary key, will that value be updated if the array is changed?
-
Just tried it and that’s how it seems to work...so it’s a pointer?
-
@iTap-Development In almost all coding environments (in.the.world) arrays and dictionaries are references. Which is (most commonly) a variable pointing to a pointer.
So, yes, you can think of them like pointers.
HOWEVER... hyperPad has some places where it locally stores what it finds, without obviously demonstrating that it's created a localised variable containing what it's gotten at a certain time. So that variable will contain what it got, when it got it. Other things in hyperPad dynamically update, some others are references and some seem to be pointers.
A table laying out which is which of everything in hyperPad would SUPER HELPFUL!!!
-
@Deeeds thanks!
-
Arrays, Dictionaries, and Box containers work similarly. Everything else pulls in the information on execution.
-
@Hamed so does it matter performance wise which I use?
-
Use the best one for the job.
If you have a list of data, use an array.
If you have a mapping of data, use a dictionary.
If you have one piece of data, use a box container.
-
@Hamed 👍 thanks!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login