4 ms·
Why do comments exist in every programming language?
- retrac 5y agoI think it's an open question whether human languages are a formal language in the computer science sense. That is actually edging in dangerously close to the great wild conjecture of our time: are our minds a computation? Anyway, It may well be true that everything in unbounded recursive formal languages can be expressed in regular human language, but the opposite is not true. Just like you cannot implement a Turing machine with regexes alone. If that is the case, it is not at all surprising that "readable programming languages" are seemingly impossible. But maybe that is not so. Perhaps human languages are nothing but a very complicated, very fuzzy formal system equivalent to Turing machine languages. The difficulty of expressing everything we can express in human language in that language is not proof of non-equivalence. As an analogy, I cannot really fathom how I would express Simcity 4 or StyleGAN in Brainfuck. Certainly not more concisely than in C++, as a comment to the C++ code. I know it is theoretically possible, but Brainfuck is a very poor fit for the task.
- _bramses 5y ago> It may well be true that everything in unbounded recursive formal languages can be expressed in regular human language, but the opposite is not true Is this statement implying that human language is recursive? I'm under the assumption that it has recursive elements, but it's not recursive in the strictest sense of the term. If anything, as anyone who's written a book can attest, language feels reactive and emergent, as opposed to funneling towards a base case.