Variable/Value

From Jonathan Gardner's Tech Wiki
Jump to: navigation, search

Overview

There are a number of values a variable could hold.

Static, Weak Typing

In static, weak typing systems, the variables are just a series of bytes. What these bytes mean is given by the type of the variable holding them.

Pointers

Pointers are values that point to another section in memory. That section could be another pointer, or a value. Generally, the type of the pointer is given along with the type of the thing it is pointing at.

References

References are values that are a pointer but the programming language doesn't allow you to manipulate it as a pointer. For all intents and purposes, it behaves as if it was the value being pointed to. Python handles all of its values that way. Variables are really pointers to objects.