this post was submitted on 18 May 2025
0 points (50.0% liked)
Programming
20211 readers
167 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Let’s make an agreement that the English word “coffee” now means 65. The reference of any word within any language only exists because we make an agreement with ourselves or with others for what a particular set of symbols gives reference to. Without an agreement, all the symbols we use mean nothing more than an arbitrary scratch on a table.
A pointer is the word, which means nothing by itself other than a grouping of letters exist, and the reference to an address is the reference to an object, which exists independently from the object—a reference to a fictional object can exist and a real object can exist without a reference.
Human language has 2 layers. Signifier and signified. Computers have 3. Signifier (variable name), memory address, (no human analog) and signified. (stored value) A pointer would be a signifier (word) for which the signified is the non-existent human analog to a memory address. You can have a word that refers to a thing that doesn't exist (e.g. unicorn) but it won't help the analogy.
In your example, the signifier 'coffee' is akin to a variable name. It is a signifier that dereferences to a value within the scope of our agreement. We can agree it holds the stored value of 65, allowing us to say something like butter = coffee - 60, bring me 'butter' eggs, but we don't have a memory address system so it's not the same process as a computer.
For a computer, there is a middle step to a variable dereference. It sees 'coffee' and first looks at the table of references, finds the variable 'coffee' has it's value stored at address 1
['coffee':1, 'butter':88, 'unicorn':73]
and then pulls the value (65) from the memory at address 1. A pointer would be another variable, such as '*monkey' (e.g.*monkey = &coffee
, which can be read as "pointer monkey shall hold the value of the address at which coffee is stored") which would be added into the reference table as a variable stored at another address, say address 2, and would store in address 2 a value of (1).Language just doesn't have the analogous concept.