14 votes

Is computer code a foreign language?

17 comments

  1. vili
    Link
    I did my master's degree in theoretical linguistics, hold another degree in language pedagogy, and these days spend many of my days programming. So this question got me thinking. One often used...
    • Exemplary

    I did my master's degree in theoretical linguistics, hold another degree in language pedagogy, and these days spend many of my days programming. So this question got me thinking.

    One often used definition of human language is that it employs a finite set of rules to generate a potentially infinite number of expressions. This is what differentiates our communicative system from those of other animals, whose modes of communication have only been observed to operate within very finite boundaries. For instance, although some birds can apparently adjust the meaning of their songs (e.g. the size of the area that they are claiming, or the type of danger that they have spotted) by tweaking the length, loudness and pitch of their song's individual parts, they can't really mix different songs or reorder existing ones, and neither do they create new ones. Meanwhile, we humans create new communicative constructions all the time. In fact, it is statistically almost certain that at least one sentence in this paragraph is a sentence that no human being has ever in the history of mankind uttered (or written down) before. Such is the flexibility of human language. We have finite sets of rules, but they generate an infinity of expressive possibilities.

    Compared to any human language, computer languages are extremely simple constructs. Yet, they do actually satisfy this "infinite from finite" test. This probably shouldn't come as a surprise though, considering that computer languages were created by us and were (for the most part) specifically designed to be as flexible as possible. Still, from this perspective, learning a computer language could be seen as an alternative to learning a more fully fledged human language. A "language lite", if you will. Mechanically, the learning process engages fairly similar skills.

    However, human languages are so much more than just logical sets of rules. (In fact, there is very little that's logical about natural languages.) Perhaps most importantly, when you learn another language, you must also learn another communicative culture. Any student of Japanese, for instance, quickly discovers that the language is fundamentally linked to local social customs, and the grammar of almost every sentence that you utter is heavily dictated by your social relationship with your interlocutor. Meanwhile, many students of English need to learn the peculiarities of English speaking communicative cultures, such as the concept and meaning of small talk, which can be a pretty alien idea for someone who grew up in a communicative culture that doesn't place such a strong emphasis on communication as a means of maintaining social relations. Every language has its peculiarities, and every dialect within introduces more variety, more cultural diversity.

    Hence, learning another human language almost automatically gives you glimpses into other modes of life, other ways of thinking and other ways of organizing our societies and our relationships with each other. It has the huge potential of making you understand and accept difference, as well as seeing that your way of living is not the only valid option out there. In doing so, it makes the Other less scary, more approachable, more acceptable. And I think that it is a direction that our world could always move more towards.

    25 votes
  2. [2]
    Comment deleted by author
    Link
    1. Hello
      Link Parent
      I would disagree with the "unique features" point. I'd argue that human languages have lots of significant differences that make them unique: Syntax: is it primarily governed by word order or...

      I would disagree with the "unique features" point. I'd argue that human languages have lots of significant differences that make them unique:

      • Syntax: is it primarily governed by word order or agreement markings? Are words modified by affixes, and if so, how much information does each affix encode? (Isolating vs. agglutinative vs. inflected languages)
      • Semantic categorization: different languages divide the world up in different ways. Which segments on the color spectrum have the same names? In English "here" is close and "there" is farther away, but some languages might merge these categories or have more intermediate categories. In different languages the word for "hand" can cover varying areas (up to the wrist? up to the elbow? the whole arm?) Are "fingers" and "toes" separate words? What about stairs and ladder? In English "hard" (as opposed to soft) and "hard" (as opposed to easy) are the same word, while in Russian they use the same word for "heavy" and "hard (not easy)", but "hard (not soft)" is a different word.
      • Required information: In English whenever you use a verb you typically have to specify a tense and a subject, and if you want to be vague about who did the action or when it happened, you have to use roundabout constructions. Some languages don't require tense or subject to be specified, and some languages require other information to be specified, such as gender, politeness level, or evidentiality (did I see this happen myself or is this secondhand information?).
      6 votes
  3. [5]
    moonbathers
    Link
    I don't think they're the same at all. A foreign spoken/written language takes way more time and effort to learn than a programming language, and there isn't near as much similarity between...

    I don't think they're the same at all. A foreign spoken/written language takes way more time and effort to learn than a programming language, and there isn't near as much similarity between spoken/written languages as between programming languages. My knowledge of English doesn't help me even remotely if I wanted to learn Arabic, but if I know C++ I can get the gist of a bunch of programming languages pretty quickly.

    4 votes
    1. [4]
      unknown user
      Link Parent
      I think that's an unfair comparison – there are certainly human languages which are similar enough that a speaker of one could roughly understand something said or written in another (German &...

      My knowledge of English doesn't help me even remotely if I wanted to learn Arabic, but if I know C++ I can get the gist of a bunch of programming languages pretty quickly.

      I think that's an unfair comparison – there are certainly human languages which are similar enough that a speaker of one could roughly understand something said or written in another (German & Dutch come to mind), and knowing C++ isn't going to help you read APL.

      3 votes
      1. [3]
        moonbathers
        Link Parent
        Even with German and Dutch being similar, though, if you wanted to become fluent in one while already being fluent in the other it's going to take time. You have to constantly practice in order to...

        Even with German and Dutch being similar, though, if you wanted to become fluent in one while already being fluent in the other it's going to take time. You have to constantly practice in order to keep those skills whereas with programming languages, you can drop something for a while and come back later and pick it up in a reasonable amount of time. In addition, and I know this is just my feelings, but I don't think knowledge of a computer compares to knowledge of another culture in the slightest.

        1. Joshua
          Link Parent
          I see where you are coming from but there is nothing dictating that a language needs to be hard to learn for it to be considered a language. I’ve only recently started to code but it does feel...

          I see where you are coming from but there is nothing dictating that a language needs to be hard to learn for it to be considered a language. I’ve only recently started to code but it does feel like another language to me. Computer languages have a syntax just like “real” languages do. You have to arrange your words or operators in the correct order or the computer won’t be able to understand what you are trying to say. You can show someone who has learned python a bit of code and they will be able to read and comprehend what you wrote for them. You show that same bit of code to someone with no coding experience and you won’t be able to get the message across. That feels like a language to me.

          2 votes
        2. unknown user
          Link Parent
          And that doesn't apply to programming languages? I don't disagree.

          if you wanted to become fluent in one while already being fluent in the other it's going to take time

          And that doesn't apply to programming languages?

          I don't think knowledge of a computer compares to knowledge of another culture in the slightest.

          I don't disagree.

  4. knocklessmonster
    Link
    Speaking as a guy who knows just enough of non-native spoken languages and programming to get in trouble, I'd say they're only similar in that they require an understanding of syntax and...

    Speaking as a guy who knows just enough of non-native spoken languages and programming to get in trouble, I'd say they're only similar in that they require an understanding of syntax and vocabulary.

    Human language is used to communicate complex ideas to other people, code is used to execute complex ideas on a computer. You can code to convey an idea, but they exist to solve different problems, and serve completely different functions in life, so I don't think they should qualify as foreign languages. I would definitely take a course if it'll meet the requirement, though.

    3 votes
  5. vili
    Link
    There's a new MIT study that reminded me about this discussion. According to the study, from a neurological point of view reading computer code is not the same as reading language as it doesn't...

    There's a new MIT study that reminded me about this discussion. According to the study, from a neurological point of view reading computer code is not the same as reading language as it doesn't activate the brain's language-processing centres.

    The full paper is here.

    3 votes
  6. [8]
    sqew
    Link
    Posted here in ~misc since this seemed to have too much crossover between ~humanities and ~comp to fit well in either. As someone who spends a lot of time programming and working with computers, I...

    Posted here in ~misc since this seemed to have too much crossover between ~humanities and ~comp to fit well in either.

    As someone who spends a lot of time programming and working with computers, I have to agree with the author of the piece. Programming languages are so different from natural languages, and they definitely fill different slots in terms of a complete education.

    2 votes
    1. [2]
      Ixa
      Link Parent
      I would probably go with them being part of the math curriculum, if I had to pick somewhere to stuff them into current schools. Many of the same thought processes that are needed for good math...

      I would probably go with them being part of the math curriculum, if I had to pick somewhere to stuff them into current schools.

      Many of the same thought processes that are needed for good math education is also a part of programming - being able to break down a big task into small manageable steps where you know how to complete each step in turn, reasoning about a problem before you start trying to solve it, etc.

      Additionally, comp sci is a lot of math. So there's also that.

      8 votes
      1. sqew
        Link Parent
        Yeah, that's roughly the way my high school did things, and I think it's probably the best way. The logic and thought processes that are useful for programming are much closer to science and math...

        Yeah, that's roughly the way my high school did things, and I think it's probably the best way. The logic and thought processes that are useful for programming are much closer to science and math than they are to those required for learning natural languages.

        2 votes
    2. [5]
      escher
      Link Parent
      Waaaay back when I was in college (over 20 years ago), we were allowed to use programming languages to fulfill foreign language credit requirements.

      Waaaay back when I was in college (over 20 years ago), we were allowed to use programming languages to fulfill foreign language credit requirements.

      4 votes
      1. [4]
        sqew
        Link Parent
        Really? That's interesting. Did you take advantage of that? If so, how do you feel about it in retrospect?

        Really? That's interesting. Did you take advantage of that? If so, how do you feel about it in retrospect?

        2 votes
        1. [3]
          escher
          Link Parent
          Turned out not to matter for me. The computer science department at that university (only one I could afford to go to) was just awful and I wound up not going to class and just reading books on...

          Turned out not to matter for me. The computer science department at that university (only one I could afford to go to) was just awful and I wound up not going to class and just reading books on the subject instead. Flunked out, but never stopped learning on my own.

          5 votes
          1. [2]
            sqew
            Link Parent
            A good teacher/professor can definitely make or break a computer science course. Glad you were able to keep learning on your own! :)

            A good teacher/professor can definitely make or break a computer science course. Glad you were able to keep learning on your own! :)

            1 vote
            1. escher
              Link Parent
              I've been coding since I was in the 3rd grade and never had any teachers so I had to learn how to learn. Turned out to be a very handy life skill. I'm a total C++ nut these days.

              I've been coding since I was in the 3rd grade and never had any teachers so I had to learn how to learn. Turned out to be a very handy life skill. I'm a total C++ nut these days.

              1 vote