Code, the Paragon of Language

Technology, Language by Adam on 2006-03-23 03:18

Programming languages are, to my mind, the pinicle of language. They are a perfect blend of precision and expressivenses.

What we think of as normal language (spoken and written) tends to be very expressive, but also terribly imprecise. This is especially true of English. It is wonderfully expressive: just a few poetic words can convey great depth of mood or emotion, with many layers of meaning.

But its lack of precision is legendary. Everything from weird gramatical bumps and tangles, to synonyms (two words that mean the same thing), to homonyms (two words that sound or look alike but have different meanings) confounds those learning English as a second language and native speakers alike. Even the grammar is inconsistent and makes it easy to construct highly ambiguous sentences. For example, “He said he would go on Tuesday” (did he say it on Tuesday, or will the travel take place on Tuesday?), or “I don’t like annoying people” (is it people who are annoying that I dislike, or the act of me annoying others?).

In stark contrast, mathematics is the purest of languages. It has perfect precision, but at the expense of expressiveness. x = 3 is clear as day: it has only one meaning. So pure is the language of mathematics that there is not even really any such thing as different mathematical languages or local dialects. But x = 3 does not convey mood, emotion, or layers of meaning. It is what it is, no more and no less. (Which is the very property that makes it so precise.)

Programming languages (such as my current favorite, Ruby) strike a balance between these two extremes that I find deeply pleasing. Often when speaking with other programmers I find that it’s much faster, easier, and clearer for me to communicate by writing a code snippet while they watch, compared to trying to explain in verbal or written English.

Writing an apropos sentence is uniquely satisfying. But writing the perfect line of code is blissful in an almost trancendent way.

Learning how to program is something I think everyone should do, even if only to a limited degree. Once you have taught your brain to think in the precise-yet-expressive terms of programming, you’ll find your ability to communicate effectively with regular language greatly improved as well.

7 comments per 'Code, the Paragon of Language'

  1. Cat says:

    Very interesting. It reminds me of a discussion I had recently with a math teacher who has been done most of his work with students who were considered remedial. What he discovered as he taught was that many of these children were quite brilliant at mathematics. However, their understanding of language was different, so they did not get usual answers. For example, when this teacher asked, “How many sides are there in a box?” he got a myriad of answers, all of which made sense upon explanation. One of which was 10. A box with no lid has 10 sides, including the inside and the outisde. When he tried different teaching techniques and explanations with these children, they excelled at math.

    The assumption is that since math is a universal language with universal concepts, anyone could learn it and in the same way. Due to this assumption, the students’ previous teachers who had sent them to remedial were only teaching and discussing it in one way. However, our imprecise and unclear language is the tool used to TEACH this universal language, and it can easily get mucked up, especially by people who utilize and understand language differently than the teacher. That child who answered “10″ was sent to remedial because a box OBVIOUSLY has 6 sides, but really it seems to me that the teacher did not understand the assumptions she was making in her own mind before asking the seemingly simple question.

  2. bryan says:

    adam, what kind of programming would you recommend for a beginner? that’s definitely something i would like to explore.

  3. Kim Bruning says:

    Learn either Python or Ruby at the moment, I think. Python with say pygame is fun and simple, while Ruby is slightly prettier.

  4. grumblebee says:

    I’m a programmer. I understand the bliss you’re talking about. Code can be achingly lovely, and it’s sad that non-coders have no inkling of this beauty.

    One thing that’s “missing” in programming languages, though, is the ability to point to objects outside of the language. (”Missing” is in quotation marks, because there wouldn’t really be a point to adding such a feature.)

    In English, I can say, “The flowers in the park have bloomed.” Yet, as the speaker, I’m not near the flowers; I’m not looking at them. My words are not affecting them. And I’m not talking about models of the flowers; I’m talking about the actual flowers.

    I don’t think there’s any analog to this in programming (other than in comments). If you write about an object in code, you’re “touching” that object: you’re DOING something to it, even if you’re just reading data from it.

    This difference has nothing to do with precision. One can imagine a more-precise English that still has the ability to point to objects without affecting them.

    Also, there’s no analog for metaphor in programming languages. Sure, one can say that an entire language — or an entire application — IS a metaphor, but that’s not what I’m talking about. I’m talking about metaphor within discreet statements.

    Metaphor’s main use is clarification. If I say, “he was as out of place at the party as a tuba in a string quartet,” I’m trying to make something clear to you. I may be trying to clarify a complex or abstract idea (”out of place at a party” is abstract). In this case, it’s more likely that I’m trying to make something emotionally clear. I know you’ll understand my meaning when I say he’s “out of place,” but I’m not sure you’ll really FEEL it — unless I add the metaphor.

    When your listener is an interpreter, there’s no need for metaphor. An interpreter has no feelings and it always understands what you say perfectly — assuming you express it perfectly.

    English needs to be fuzzy, because it’s used to pass data between two (or more) minds that are not exactly the same. All C compilers are — or should be — exactly the same. And once a compiler understands something, it can’t understand it more deeply. Understanding is binary for a compiler/interpreter. It understands or it doesn’t. English is for “interpreters” that have various levels of understanding.

  5. Sterling says:

    Funny, I was just thinking the other day how programming languages are both a very expressive form of logic and a very precise form of language.

  6. Bookmarks about Languages says:

    […] ecret-languages/ - bookmarked by 2 members originally found by luvstodream on 2008-09-23 Code, the Paragon of Language - bookmarked by 1 membe […]

  7. Danielle Fong says:

    One of the most wonderful features of natural language is its imprecision. Because it can be interpreted in many ways, the listener’s or reader’s imagination itself is called into action to cooperatively synthesize meaning.

Post a comment

Enter your comment (some HTML allowed)