Skip to main content

Code as language

Topics/tags: Rants, education

One of the many newsletters I still receive included a link to an article in language magazine entitled Senate Bill Counts Coding for Language Requirement. The article says that

The proposal has the stated goal of boosting high school coding programs, but grants are awarded to schools that allow students to replace a required course in mathematics, science, or foreign language with computer coding.

Now, that’s not quite the same thing as saying that coding counts as a language requirement. But it’s troublesome. Computer science may have science in its name, but it isn’t really science [1]. It’s not math, either. However, given the many problems with high-school mathematics courses, a CS course could be an interesting alternative to providing students think more formally.

But what about replacing a non-native language course [2] with a CS course? That’s one of those topics that people keep talking about. I even recall a graduate student who convinced his committee to let Fortran serve as his foreign language. But every time I hear that suggestion, I dismiss it. There are a lot of reasons to learn another language. Almost none of them apply to computer languages.

Let’s see what the article says. After all, it’s from a language whose tagline is Improving Literacy and Communication.

Most linguists argue that coding should not be considered a true language as it lacks the ambiguity and redundancy of a natural language.

[A]mbiguity and redundancy. That’s how they defend natural languages? That’s depressing. Here’s some of what I’d say [3].

As much as some people want to deny it, The world is increasingly global. Learning another language prepares students to interact with people from another place [4].

Language courses are about more than language. Learning a natural language other than your native language exposes you to a culture other than your native culture. And, as you might expect, learning another culture can not only help students better understand their own culture, it can also help them be more receptive to a variety of viewpoints and approaches.

Courses in another language teach you about the structure of your own language. I hear again and again from students who tell me that they only understood the structure of sentences in English or the concept of something like the subjunctive mood when they learned them in another language.

I’m not a neuroscientist, but I’m pretty sure that computer languages (and computer programming) exercise a different part of your brain than do natural languages. There’s likely some overlap. But CS is more about formal thinking than it is about language.

I’ll admit that there are some similarities between non-native natural languages and computer languages. Both generally feel foreign to someone as they learn them. Both require you to understand how to structure statements. Most importantly, both natural language and computer languages serve as tools to communicate ideas. As I tell my CS students, computer languages convey algorithms not only to the computer, but also to other humans. But computer languages are only intended to convey a narrow range of ideas: algorithms and ways of structuring data. In contrast, natural languages are intended to convey a much broader range of ideas. Given a choice, I’d prefer to encourage students to express themselves broadly.

Does this mean that I oppose the idea of adding CS classes to high schools? Certainly not. I find great benefit in helping students think computationally. I also accept that knowing how to program is currently one of the ways to enhance your economic standing [5]. But replacing language with CS? No way, no how.


Postscript: I realize that I promised not to write any rants this month. However, this is not a rant about my job. I don’t know if that makes it okay, but I don’t case. It’s not something that I was willing to let sit for a few more weeks.


[1] There are some ways in which computer science can be a science. On some frontiers of CS, there’s a lot of hypothesis-driven experimental research. But what they teach in a high-school CS class is generally how to design and write programs. And that’s not science.

[2] I’ve started to try to avoid the term foreign language since every language is foreign to someone and native to someone else.

[3] That’s not just what I’d say. It’s also what part of what I normally say when someone suggests treating a computer language as a foreign language. I usually add a more disparaging comment, too, such as That’s a ludicrous idea.

[4] I disagree with the careerization of high-schools. But I do know that able to communicate in another language is a valued skill by many employers.

[5] I do worry that once enough people know how to program, that knowledge will become devalued. And I worry that we are already at the point that most HR people can’t tell the difference between a good programmer and a merely competent programmer and, because of that, make choices based on bad criteria.


Version 1.0 of 2018-07-21.