Natural vs Programming Languages
The cluster debates the suitability of natural languages like English for programming, highlighting their ambiguity, imprecision, and contextual nature compared to the precision and explicitness required in programming languages.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Language or "human order" is pretty cumbersome to express ideas. It is full of double meanings, assumption and expectations.Any attempt to express complicated and precise ideas in natural language results in hard to understand gibberish. And you will need special training to decipher it anyway. Law is good example.I think programming languages as we have them are good for instructing computers.
Not really... The syntax of natural languages isn't really comparable with programming languages. Completely different modes of understanding. Calling programming languages "languages" is only an analogy. Humans have highly evolved linguistic capabilities that don't really apply to programming languages (though if you could invent one that leveraged natural language capability, you might have something very interesting on your hands.)
You mean like SQL? That is a literal / formal language, but still quite legible in English. A looser one is Siri and Google's voice recognition, same idea. The main problem though is interpretation and specificity, something which English isn't very good in (multiple interpretations possible). Which is what programmers are paid for; translating loose requirements ('I want a contact form') into code (fields, styling, validation, submission, storage, reporting, etc).
No, not at all. Natural language is imprecise, ambiguous and heavily contextual in both its structure and semantic meaning. All those qualities are sources of bugs or undefined behaviour in programming.As others have said in this thread: programming "languages" are not like natural languages for a reason, and conciseness is a big part of that. The two fill a completely different role, and it should be obvious that the brain structures involved are different too.To illustrate that
true, code is very different than natural language. any plans for incorporating it?
This seems similar to Applescript. Someone wants to make a precise language that looks like English and can be read and written by non-programmers. Ultimately you get the reading part, sort of, but writing is harder. You end up with very subtle and precise rules in the grammar which are not as easily inferred correctly as with many common programming languages. Just writing sentences that you think should be correct won't work. You need to fully understand the programming language. So you&#
"The hottest new programming language is English" - KarpathyI call bullshit, mainly because any natural language is ambiguous at best, and incomplete at worst.
I think it's more that programming languages have to be precise and unforgiving. Natural language is the opposite.
Great question, been asking myself that for a while as well (no sarcasm, I swear). After all, why not take our natural language instructions and output perfect machine code? Why mess with the HUMAN interface to programming a computer? Well, the only right answer can be that LLM's don't know the FIRST THING about computers. We humans don't program computers with natural language. We program them in PLs, mostly with Python and JavaScript. So those are what an LLM can mimic the best.
I would say no. It's a shorthand way of writing very explicit instructions. There is far more variety and nuance in human languages than in programming languages.