Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 7 Online
OpenStudy (anonymous):

hi.what are the reasons for calling a value by reference?

OpenStudy (anonymous):

If you mean calling a value by reference as opposed to index (as in, a dictionary), there are a number of different reasons. First, if you are using a dictionary, it can actually be faster for the computer to call the value. Secondly, calling by reference can be extremely helpful for distinguishing values. For example, there is a problem set that has a dictionary of the letters in the alphabet assigned to their scrabble point values. So if you wanted to know how much 'c' was worth, it would be much easier to use 'c' as a reference than to figure out what index in a list c's value would be linked to. I'm not sure if this is exactly what you were asking about, so sorry if I'm totally off!

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!