3 ms·
> Programs are not text Wow. It's amazing to see the beast laid out so clearly before me. As someone who grew with the mantra "a program is a piece of text",
by enriquto 2y ago
> Programs are not text
Wow. It's amazing to see the beast laid out so clearly before me.
As someone who grew with the mantra "a program is a piece of text", my jaw dropped when I read this post and realized that it was not written in jest. Of course the mantra is still deeply entrenched in my mind, it's too late to remove it now; but I feel as if the world is crumbling around me. What other sacred beliefs will fall? Why doesn't everybody realize that the text file is one of the finest inventions of the third millennium?
Maybe it's just another period in the eternal cycle of fashion trends... programs as free-form text files were an exhilarating liberation from the crufty, fixed-form structures of older languages. Now, we are not only going back to write our code starting at column 4 (like in punched cards), but we still want to add even more structure to it! Maybe in forty years we will go back to free-form text and cherish it again.
Reading the sentence "programs are not text" was the first time I felt old in my life.
- notpushkin 2y agoPrograms weren’t free-form text at any time in history (esoteric languages aside). There is still structure, it’s just enforced by the compiler (and maybe linter).
- globular-toast 2y agoAre you aware of Lisp? In Lisp programs were never "text". They are written directly as trees which are evaluated as part of the program execution. The trees themselves can be written via text, e.g. using s-expressions which are a tiny minimal way to represent trees as text, but they could also be generated via code (called macros) or written in some other way entirely. This is fundamental to understanding Lisp and one of the reasons "programs are text" people are often put off at first.
- prerok 2y agoTBH, I think you are reading too much into it. For me, json files are also just text files. Or ini files. Or md files. They do, however, prescribe some structure, or syntax, in them, to be parseable by the interpreter/compiler/whatever. I think this has always been the case.