Vocabulary is not the real difference. A word is an abstract concept given a definition in terms of other words. The equivalent of set of related words is an API in a programming language.
The real difference is that natural languages are intended and optimized for speaking, and they inherently encourage ambiguity because conversation is an interactive process where one can request clarification. Programming languages are typically non-interactive and don't tolerate ambiguity at all.
It also is. Because in a programming language every vocable is clearly defined when used, or you get an error.
Words in natural languages are not really clearly defined. There is only a very small subset of words, people are not fighting over their definition.
Thats why it is an art, to write a understandable book. Or give a lecture, the audience can understand.
But you are right, languages are optimized for being spoken in 2 ways. With the possibilitie of clarification.
>1 undefined behavior
>behavior, upon use of a non portable or erroneous program construct or of erroneous data, for which this International Standard imposes no requirements
>2 NOTE Possible undefined behavior ranges from ignoring the situation completely with unpredictable results, to behaving during translation or program execution in a documented manner characteristic of the environment (with or without the issuance of a diagnostic message), to terminating a translation or execution (with the issuance of a diagnostic message).
>3 EXAMPLE An example of undefined behavior is the behavior on integer overflow.
Yeah, that is obvious, but is there a example, where a defined variable is not clear defined and ambigious?
Larry Wall vehemently disagrees.
As for human languages, being bilingual myself (acquired over 30ish years (am 37), not innate), I can only testify that this is as close to having "two different minds" as it gets— the sheer experience of life is different depending on which language you think it in, you speak it or write it to others.
That's as close as I can get experientially (qualia) to the notion that language is culture, civilization, thus psychological mindset (both individual and collective).
It's a very weird experience of life to have this ability to switch between modes. Doesn't make you any smarter I guess, but certainly opens one's horizons, helps thinking 'out of the box' (i.e. perspective), reach more balanced views perhaps.
I'd like to write a short piece about that someday. Hopefully later if #19 hasn't disposed of me by then.
Note that there is little to no overlap with programming languages or math. You can think these domains in any human language, the translation in symbols/code remains identical, ideally (that's formalism to me, requiring mathematical rigor, not literature skills).
As such, it is interesting and enriching to learn both— several human languages, and math (or at least one programming language). You gain things from each that do not exist in the other subset no matter how deep you look.
The appeal and strength of a programming language is its ability to be executed, something that pure mathematics does not and cannot ever have.
Then you haven't learned anything. Even pure mathematics is still expressed in arbitrary notation. It's no different than a programming language in that regard.
You can see that if you ever try to do actual maths on a computer, e.g. with a CAS or, worse, an automated theorem prover. Suddenly you have to care about all these technical details and you get bogged down quickly.
I'd rather ignore ad hominem above ;)
I would push back slightly on this. I don't consider the ability to have a conversation in french to be a greater achievement than reading (and understanding) a latin text.
can you read latin?
The greater point is that reading and writing are actually both easier and simpler than listening and speaking[0], even though we tend to learn how to do the former after the latter; think of the difference in difficulty between building software that can process natural language from text vs. from speech, and realise that many of the same additional problems (such as the sheer ambiguity of sound versus letters and the ephemerality of real-time speech) apply to human brains as well as to software systems. In fact, as you develop beyond infancy, the ability of your brain to distinguish sounds that are not a part of your native language(s) rapidly atrophies in favour of optimising for the ones you heard on a daily basis as a baby[1].
> can you read latin?
No, because I have next to zero interest in it. I am however familiar enough with [Ecclesiastical] Latin to recognise that it is largely overhyped in "difficulty" by monolingual English speakers for whom it is their first tangle with extensive conjugations and declensions - it's not much harder or more complex than the Romance languages it birthed[2], and is significantly less so than, say, modern Arabic or many of the Slavic languages.
0. Additionally reading and listening are relatively easier than writing and speaking respectively, due to the brain ingesting information more readily than it produces it.
1. There are about 800 distinct sounds used in all human speech, but the average language only uses ~40. By the time you're a year old, you've neurally committed to whatever handful of those sounds those around you have been making; you become hard-pressed indeed to even hear the difference between the remaining ~760 and the ones you already know. As a concrete example I've had personal experience with, in Hausa the sound written as `f` isn't pronounced labiodentally (upper teeth to bottom lip, the way it is in English) but rather bilabially (lips close together, not quite touching, and air forced between them at varying speeds depending on the word). People whose languages don't have that sound almost invariably interpret that sound as a `p`, an English `f`, or even an `h`.
2. As something of an aside, French is my third language (having been exposed to it since I was three or four years old) and I can attest to how much more difficult it is to speak/listen to it than to read it.
Computers have a much easier time translating text than they do holding conversations. That might be an indication that one is more complex than the other.
>That might be an indication that one is more complex than the other.
It just means that most of the work is done by the humans.
If it was easier for computers to do it, they would. That humans do the work is further evidence it is more complex.
The only difference I see is that we don't speak C++ (though you could argue that sometimes we do). Mostly because it is pretty laborious and not worth the effort when we have a common tongue (pun intended) between us.
Spoken languages were created to communicate. They advanced to allow us to convey complex and highly abstract ideas. I wouldn't say programming languages were constructed with the same intent (at least they are intended to be interpreted by a computer, not by a human).