Guido van Rossum
๐ค PersonAppearances Over Time
Podcast Appearances
I have my program and I write program XY.
Well, that already has a meaning because that presumably means X itself is the file.
It's a file name.
It's not a variable name.
And so the inventors of things like the Unix shell, and I'm sure job command language at IBM before that,
had to use something that made it clear to the script processor, here is an X that is not actually the name of a file, which you just pass through to the program you're running.
Here is an X that is the name of a variable.
And when you're writing a script processor, you try to keep it as simple as possible.
Because certainly in the 50s and 60s, the thing that interprets the script had to be a very small program because it had to fit in a very small part of memory.
And so saying, oh, just look at each character.
And if you see a dollar sign, you jump to another section of the code and then you gobble up characters or say until the next space or something.
And you say that's the variable name.
And so it was sort of invented as a clever way to make parsing of things that contain both variable and fixed parts very easy in a very simple script processor.
It also helps, even then, it also helps the human author and the human reader of the script understand
to quickly see, oh, 20 lines down in the script, I see a reference to XYZ.
Oh, it has a dollar in front of it.
So now we know that XYZ must be one of the parameters of the script.
Oh yeah, I think there's a lot of it in Wikipedia too, for example.
Just like biological systems, right?
I mean, the inner workings of DNA have been stable for, well, I don't know how long it was, like 300 million years, half a billion years?