by c3534l · 8y ago · 0 comments
You can draw comparisons between natural language and programming languages just fine. Maybe functions are like verbs and arguments are like the subject. And maybe partial application of a function is like having an intransitive verb. Maybe a decorator is like an adverb and a type constraint is like an adjective.
In general, though, I think the metaphor about programming languages is wrong: programming languages are instructions, not really languages. A programming language should be easy to read out of order more like a magazine than a novel, it should be possible to get a general grasp of what it's doing by glancing at the code, and the code should eliminate ambiguity and uncertainty. Natural languages don't work that way; they're repetitive, vague, and rely on context (social and otherwise).
Unsurprisingly, legal documents have a reputation for being at least as difficult to read as some code.
Natural language, designed for human communication, is, by its nature, unsuitable for precise definition, and a precise language is also unsuitable for human communication.
It really makes sense once you realize how much conversation and prose depend on puns, allegory, allusion, symbols, context, emotion, and so on. All of which are hostile to stating a thing as exactly as possible.