Earlier quoted context omitted.
First: that language acquisition at a later age is so much harder is not true. It takes a child 6 to 10 years to get fluent in their first language, and they don't spend 3 hours per week studying it, but 80. For adults, there are language schools with an immersive program. They are expensive, but successful. You probably won't get as good as when you'd have been immersed from day 1 in your life, but you can get quite…
Have you never met any immigrants before? There's a very stark cutoff age before which learning a language results in no accent and after which the accent is almost impossible to eliminate.
To the brain, reading computer code is not the same as reading language
221–230 of 232 posts
Re: To the brain, reading computer code is not the same as reading language
#222Earlier quoted context omitted.
The people you're talking to are just incredibly intelligent compilers. We could make a compiler that takes something that resembles a for loop and changes it to be correct, but to do so would strip a programmer of the power to make something similar to but not quite a for loop, which would generally be undesirable in a programming language. "I go store" is reasonably close to correct: you have a subject, predicate,…
The difference is in natural languages you can make tons of errors and be extremely fuzzy and it won't harm the interpretation. Compilers make you update, language doesn't (this does actually cause people to speak a language for decades and never sound native). Often times we can use grammar of another language and the words from another and still get concepts aligned (useful for language learners who will tend to us…
> Natural languages are so full of ambiguity that even native speakers from similar regions often confuse one another.
These two statements are contradictory. There's a difference between not caring that an error is present and being robust to error. Natural language represents the former. Yes I might not shout "Error: finger shoes not recognized" but that error nevertheless occurred, I don't actually know what they meant. I'm going to assume gloves, but if their life depended on me getting them mittens they'ed probably wish I had said I don't understand. Luckily, we live in a world where getting things wrong is typically harmless, but history is full of disastrous misunderstandings. If you are doing something important like drawing up a legal contract, your lawyer should have no problem telling you "that wording is unacceptable." which is conceptually no different from a compiler's syntax error.
Natural language and programming languages are different in many ways in terms of degree. Natural languages need to be used in vastly more circumstances, they have been in use for vastly longer, and they generally represent an ad hoc development cycle involving millions of independent contributors. They thus have much more deprecated functionality and conflicting user conventions. But while different in degree, the two aren't really different in kind - every fundamental trait of one is shared by the other, which is why the fuzzy compiler for natural language will accept the terms for a programming language as a substitute without raising any error.
Re: To the brain, reading computer code is not the same as reading language
#223Earlier quoted context omitted.
The difference is in natural languages you can make tons of errors and be extremely fuzzy and it won't harm the interpretation. Compilers make you update, language doesn't (this does actually cause people to speak a language for decades and never sound native). Often times we can use grammar of another language and the words from another and still get concepts aligned (useful for language learners who will tend to us…
> The difference is in natural languages you can make tons of errors and be extremely fuzzy and it won't harm the interpretation. > Natural languages are so full of ambiguity that even native speakers from similar regions often confuse one another. These two statements are contradictory. There's a difference between not caring that an error is present and being robust to error. Natural language represents the former.…
So let's look at the two parts you quotes from me and give some examples. We've conversing quite well, wouldn't you say? You understand me and I understand you? So #1 must be true, right? But have you ever played the game telephone[0]. With the general outcome of every game that must mean that #1 cannot be true, yet here we are. Like I said before, when communicating there's: what is intended, what is said, and what is heard. Usually these align pretty well. But small fuzzing adds up quite quickly. But it should also illustrate to you that what you hear (or read) isn't what the speaker (or writer) intended. Their job is to convey as best as they can to you while your job is to interpret as best as you can. Language being of this form allows us to express wildly abstract concepts, especially ones beyond our capacity to even understand. This is the usefulness of natural languages. But it is also why we created mathematical and programming languages, but why they will never be able to have the same expressiveness. You cannot program what you do not understand. But you must be able to talk about what you do not understand, if you are ever to hope to one day understand it.
I'd encourage you to read both more about linguistics and compilers. If you're feeling lazy, Tom Scott has some decent linguistics videos and are aimed at STEM audiences. For more technical maybe see NativLang. For a book, checkout The Unfolding of Language.
[0] https://en.wikipedia.org/wiki/Telephone_(game)
Edit: btw, you did get the meaning of finger shoes (German) even with the extreme limitations of only text based communication.
Re: To the brain, reading computer code is not the same as reading language
#224Earlier quoted context omitted.
And I myself prefer "notation" because with notation we tend to look at the underlying thing, not the notation :) E.g. there are different notations for chess parties, but their peculiarities are not that important, it's the party that matters.
Given that words like "language" and "notation" both come with a set of expectations, I wonder if APL and similar languages that we might as well call "notation-oriented" would have become more widely adopted if we had used "programming notation"
Re: To the brain, reading computer code is not the same as reading language
#225Earlier quoted context omitted.
Ditto! I can also listen to a podcast or have a video playing in the background and still write code. Definitely can’t do that when trying to write English.
Listening to music with lyrics is already hard for me when I'm writing code, but listening to a podcast is unthinkable--what kind of podcast? Don't you get distracted by the people talking?
Re: To the brain, reading computer code is not the same as reading language
#226Earlier quoted context omitted.
> The difference is in natural languages you can make tons of errors and be extremely fuzzy and it won't harm the interpretation. > Natural languages are so full of ambiguity that even native speakers from similar regions often confuse one another. These two statements are contradictory. There's a difference between not caring that an error is present and being robust to error. Natural language represents the former.…
They aren't contradictory. You're working backwards to make humans like computers/interpreters. The fact that human interpretation 'doesn't care' is not so much a feature but a necessity. Ambiguity is inherent to natural languages, not a failure of them, nor a feature. On the other side, programming languages are strict my nature and it is a necessity. In programming we have a limited vocabulary and that limits our e…
I don't know if by "we've conversing" you meant we are or we have been conversing. Those two possibilities are close enough to one another that substituting the wrong one will probably not cause a catastrophic failure, but perhaps you meant to use the pluperfect to imply that the conversation was done in some "drop the mic" moment that was completely lost on me.
Telephone is not a game of ambiguity, but of noisy communication. If you start with cat you might get bat at the end, but you wouldn't get feline. You could easily win at telephone by speaking the same meaningless statement repeatedly and you can lose at telephone with a grammatically correct statement which is nevertheless phonetically similar to some other statement. "Blue blue blue blue" is going to make it, "blue crew flew you" probably won't. A fault in transmission is fundamentally different from a syntax error, more analogous to a letter getting lost in the mail or a mistyped letter on the keyboard.
There is a fundamental difference between getting your point across and getting a point across that's similar enough to accomplish your goals.
Consider the following statements:
"I want you to feed my cat
"I want my cat fed"
"I want feed cat"
"You food cat"
"Cat food"
"Weird Dog Rice"
"seltsamer Hundereis"
I am certain you know what I mean in the first sentence. I would be amazed if you could deduce the meaning of the last without further clarification. Between these extremes there is some point where your compiler's heuristics fail, and likely long before that you start losing nuance and details. Natural language error tolerance has its limits.
Now consider the following javascript expressions:
for (let cat in catstofeed) {feedCat(cat)}
var i=1; while (i) { try { feedCat(catstofeed[i-1]); i = i+1; } catch (e) { i = 0;};
var i=0; while (i) { try { feedCat(catstofeed[i]); i = i+1; } catch (e) { i = 0;};
while (i) { try { feedCat(catstofeed[i]); i = i+1; } catch (e) { i = 0;};
If you substituted the second for the first, you'd accomplish what you were setting out to do. The third would lead to a wildly different result but is still valid. The final case is ambiguous, a smart compiler could guess the programmer intended for statement 2's functionality, but asking for clarification is the safer option.
You are right that trying to have a human conversation with only a few dozen words and a very limited sentence structure would be very difficult - a vast vocabulary and complicated grammar is a hard requirement for a natural language, and ambiguity is thus unavoidable. Dealing with such a high level of ambiguity is thus also a requirement of a natural language compiler, and such a compiler is beyond the capability of any existing silicon computer. But just because a language has more words and more valid expressions does not fundamentally change what it is, any more than adding more processing power to a computer eventually makes it stop being a computer.
If you wanted to make a programming language with 50000 keywords and an extremely forgiving syntax, you could do so. It would be extremely impractical for programming a current computer, which is only capable of a few distinct operations and thus has no need for nuance, but it would still work, and damn wouldn't it be great at self documenting.
Re: To the brain, reading computer code is not the same as reading language
#227Earlier quoted context omitted.
They aren't contradictory. You're working backwards to make humans like computers/interpreters. The fact that human interpretation 'doesn't care' is not so much a feature but a necessity. Ambiguity is inherent to natural languages, not a failure of them, nor a feature. On the other side, programming languages are strict my nature and it is a necessity. In programming we have a limited vocabulary and that limits our e…
In the first you say that ambiguity will not harm interpretation, in the second you say that it will cause confusion. I interpreted these statements to be contradictory because my compiler evaluates "harm interpretation" == "cause confusion" to be true. I don't know if by "we've conversing" you meant we are or we have been conversing. Those two possibilities are close enough to one another that substituting the wrong…
That's because that's not what I said nor what I meant.
Re: To the brain, reading computer code is not the same as reading language
#228And yet natural language aptitude highly predicts programming ability[0] [0] https://cacm.acm.org/careers/243179-forget-math-language-ski...
But limitedness of the methodology means the conclusion can't apply to software development at large, something that the title misleads us about.
[1]: https://twitter.com/wcrichton/status/1339235494102753280
Re: To the brain, reading computer code is not the same as reading language
#229Earlier quoted context omitted.
I have the exact opposite experience. For me, part of the problem is that in math, you have options. If you forget the quadratic formula, you can: - Re-derive it by completing the square on the general quadratic - Solve a specific quadratic you're interested in by factoring or graphing - Try to find zeros with numerical methods The point is, everything's connected to everything else, so it doesn't matter if you forge…
That is such an interesting and...low-level way to think of it. To me it feels a little deeper than just there being a "maze of rules". Your earlier mention of "everything's connected to everything else" resonated with me more. In a sense, the expressive power of programming languages, and mathematical notation, feels very small . I liked the board game metaphor brought up in the top comment: programming languages an…
Re: To the brain, reading computer code is not the same as reading language
#230Earlier quoted context omitted.
I was originally surprised by the study and your comment, since I generally find no difference between natural languages , math and programming languages. (I am a math major). However, most of the people I interact with find my exposition methods curious in sense of structure. So, I shared this study with some of my friends, and they agreed with the study too. When I pointed out my surprise to them, they told me that…
Wow, that's crazy. Others here, and presumably your friends, have talked about how they think of programming "visually", but they don't think visually about conversing in natural language. I thought of a concrete way to describe it: it "feels obvious" to me that any programming language could be "easily" replaced by a systematic diagramming method, with programs translated systematically into equivalent diagrams. If…