Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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 I speak like a computer program in the sense of structure of exposition.

So, I guess I agree with this study in general, and actually would love to know what's going on in my brain.

For what it's worth, I am fluent in 4 natural languages from two different families and I'm learning a fifth language. Also, I'm fluent in multiple programming languages.



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 forget any part of it as long as you remember some critical mass.

To be fully fluent in a programming language, you have to memorize two or three dozen keywords and a handful of operators (mostly the same as standard math). To be fluent in a natural language, you have to memorize two or three dozen words a week for years. Not to mention understanding all the insane grammatical stuff.

With human languages, sure it's easy enough to remember that "nec-" means "dead" (especially if you consume fantasy novels / games where necromancy is a school of magic), but you're still totally screwed if you can't remember whether the word you need is "necare" or "necire," "necobitis" or "necabitis" or "necibetas". There's no rhyme or reason to any of it, your knowledge won't help you figure out whether that letter's supposed to be an "o" or an "i", or the difference between past tense and future tense and perfect tense and imperfect tense and tensile strength and gaaah why is this all so complicated!?

It's like if a programming language had 20 different versions of each keyword, and they were all spelled with one or two letters different, usually only the vowels are different. And they all compile, getting the wrong one just creates subtle semantic bugs at runtime. And there's a maze of rules telling you which version of the keyword you use if you're inside a loop body or a function body or a conditional statement body. Oh, and there are six different versions of the "if" keyword, and they're all two letters long, good luck getting the right one of those. And if your code's going to be executing two or more times, all the names of your variables will suddenly be different. And when you refer to a struct outside of the function that created it, all the field names are transformed. And whoever was writing the compiler put ten different special cases in the code for transforming your variable names, just because they could.


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 and mathematical notation merely feel like arrangements of board game pieces (from an infinite box, and the rules of how they can be arranged are "context-free"). They don't have meaning except what we impose (ideally, assisted by comments).

A metaphor I brought up in another comment is that it feels "easy" to systematically translate an arbitrary program into an equivalent diagram, such that the diagram would contain 100% of the operational information in the program, and could be runnable as-is. (Would be cumbersome to input into the computer, ofc.) Whereas the idea of systematically translating an arbitrary natural sentence into a diagram just seems...nonsensical to me. I wouldn't even know where to begin.

Does that resonate with you?


> Whereas the idea of systematically translating an arbitrary natural sentence into a diagram just seems...nonsensical to me. I wouldn't even know where to begin.

we actually literally did this in high school. It was very informative for me.


This is really an interesting thought. Would it surprise you if I said that for me, it works in an opposite manner? I first think in terms of diagrams and the construct sentences for it, whether it be programming language, natural language or math.


https://en.wikipedia.org/wiki/Sentence_diagram#Reed%E2%80%93... is totally a thing I recall with moderate fondness from high school.

Yes, if you try to apply it to some parts of "Moby Dick" it will be rather painful. :)


Have you studied syntax? They diagram sentences all the time


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 anything, a diagram would be clearer and more readable to me than the same program in plaintext. (Of course, it would be much more cumbersome to input such a diagram into a computer than plaintext.)

Whereas the idea of systematically translating arbitrary natural language sentences into diagrams is...nonsensical to me. I mean I wouldn't even know where to begin.

I'm curious if for you, do you feel like you could easily systematically translate a natural language sentence into a diagram? Or, because you don't think as visually as people like me, translating a program into a diagram is not "obvious" to you at all? Or maybe this distinction just doesn't feel significant to you, one language being diagram-translatable and another being diagram-untranslatable doesn't cause them to feel different, they feel equally language-y to you?


Context-free grammars were originally invented by linguists for analyzing natural language. You can see examples of phrase structure and dependency diagrams e.g. here: https://en.wikipedia.org/wiki/Dependency_grammar

For what it's worth, I agree with OP, and have a very "language-oriented" thinking style. I certainly don't visualize anything while programming or doing math (except for geometry and the like). My thinking feels like it's more based on constraint solving and seeing analogies between domains.


I do feel that I could easily translate natural languages into a diagram as well. I am a very visual thinker, but that visual seeps into natural languages as well.


Whoops, missed the comment window on all the replies to me except for this one!

I clearly completely failed to communicate what I meant about "diagramming" a programming language, as evidenced by all the people pointing out that syntax tree diagrams work fine on natural languages, and indeed were originally created for natural languages, which is totally missing the point.

What I meant was that the semantics of programming languages are so limited and constrained that they could easily be translated into an "executable diagram", such as a control-flow graph for imperative code, or a dataflow graph for functional code. The syntax of natural languages is indeed more-or-less similarly constrained as programming languages, but the semantics of natural languages seems completely nebulous and ill-defined to me.

To use the board game analogy from earlier, you could conceivably learn to play chess entirely in terms of chess notation ("1. e4 e5 2. Nf3 Nc6 3. Bb5 a6"), without ever learning about the 8x8 chessboard or the 16 pieces. Chess notation shares no syntactic structure whatsoever with the "syntax"/diagram drawing rules of a chessboard and pieces, yet their semantics are exactly equivalent.

In the same way, the "syntax"/diagram drawing rules of control-flow graphs has no syntactic structure in common with imperative code, yet exactly equivalent semantics. Could you imagine a diagram system that has no syntactic structure in common with natural language, yet completely captures the semantics?

I cannot begin to imagine that. The semantics of natural language defy description.


I'm curious what's your first language. I'm learning Mandarin and find that it feels much closer to a computer language than English or Latin based. Though I don't think I'd say learning Mandarin (or any language) is anywhere near what it's been like learning computer languages. I find mathematical language different from both as well. They do feel like 3 different parts of my brain. Though math I'm highly visual (not this way in programming or English, but visual in Mandarin).


That could be because Mandarin grammar is actually relatively simple, the difficulty is in “naturally” expanding your vocabulary (since characters take an order of magnitude longer to learn).

It wouldn’t surprise me if a lot of it feels like brute forcing syntax and keywords - there’s no way of reasoning through it, you just have to knuckle down and learn it.

It’s also part of the driving force behind my app (link in bio) - it can take a long time (i.e. years) to get comfortable carrying on a conversation, so I want to help people practise in a less intimidating environment.


My first language is Marathi which is an Indo-Aryan language. My other languages are

West Germanic: English

Indo-Aryan: Hindi, Bengali

Dravidian: Kannada

And currently, I'm learning German.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: