In terms of scope? Actual implementation in memory? The syntax? For eg, if (let a 1) Is \'a\' a variable or a symbol?
A symbol is a name for a thing. A variable is a mutable pointer to a mutable storage location.
In the code snippet you showed, both let
and a
are symbols. Within the scope of the let
block, the symbol a
denotes a variable which is currently bound to the value 1
.
But the name of the thing is not the thing itself. The symbol a
is not a variable. It is a name for a variable. But only in this specific context. In a different context, the name a
can refer to a completely different thing.
Example: the symbol jaguar
may, depending on context, denote