News for hackers. Stuff that matters.
Re:Programming languages are not languages (2018) by naasking on Tuesday April 14, 2020 @05:21PM (#22871613)
> The reality is that programming languages are languages, but only for a very restricted vocabulary that is not even close to what can be done on human languages.

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.

Re:Programming languages are not languages (2018) by hutzlibu on Tuesday April 14, 2020 @06:34PM (#22872314)
"Vocabulary is not the real difference. "

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.

Re:Programming languages are not languages (2018) by imoverclocked on Tuesday April 14, 2020 @09:21PM (#22873472)
Clearly, you have never read the C spec.
Re:Programming languages are not languages (2018) by hutzlibu on Wednesday April 15, 2020 @07:41AM (#22876601)
No I did not. But in the end, when it gets compiled, every word is clearly defined, or not?
Re:Programming languages are not languages (2018) by grawprog on Wednesday April 15, 2020 @10:06AM (#22877802)
>C11(ISO/IEC 9899:201x) §3.4.3

>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.

Re:Programming languages are not languages (2018) by hutzlibu on Wednesday April 15, 2020 @02:20PM (#22881142)
"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?

Re:Programming languages are not languages (2018) by gowld on Tuesday April 14, 2020 @07:56PM (#22872897)
> Programming languages are typically non-interactive and don't tolerate ambiguity at all.

Larry Wall vehemently disagrees.