Multithreading

I am a computer engineer.  Before I learned Japanese, I have learned about sixteen different computer languages to a degree of proficiency with which I can make production applications out of them.  In doing so, I realized that there are features every language that runs on a procedural basis will have, and each language implements these using a slightly different syntax.  The same thing is essentially true with human languages:  why do all languages have essentially the same underlying conceptual structure, and only differ by means of vocabulary and grammar?  I think the answer to that is pretty obvious.  As someone I asked that question of once told me, “It’s the language of living”.

Out of procedural computer science evolved the idea of “pre-emptive multitasking”.  By which I mean, each process gets its own environment, and is not aware or doesn’t care that it is running on a multitasking operating system.  Sure, it could probably figure out how much time it was being allocated by checking the actual system time (and there are actual processes that do just this, they’re called “watchdog” processes, and they can be implemented in hardware too), but by and large, they’re completely unaware of other processes that are running.

This is one feature that human language has, to my knowledge, never had.  Perhaps for good reason, but I’m not talking about things with good reason.  I’m talking about my thoughts.

Because of the way my mind works, I have often wished there was a feature in language by which you could “save your stack”, in a sense, and then go off on another completely tangential thought, pop the stack again, and continue on like you never said anything.  That would be an interesting linguistic feature to have, and frankly, I’m curious about what kind of culture could use such a language feature.  We have something similar in the usage of parentheses (and hyphens, as I use them), but there’s no way to intermingle multiple separate thoughts together and not lose the cohesiveness of the whole.

I’ve often wondered what such a language would look like, and if most people could even adapt to it.  If I were to do it in Japanese, I would just add a couple of particles.  In English, well, I’d have to use a symbol and probably a really odd pronunciation, or some such.  I don’t know.  I’m not a linguist (and especially not a cunning one), so I wouldn’t know how to create it, and frankly, I’ve probably just caused every single linguist’s head to explode, followed quickly by a loud shout of “What?!  You can’t do that!”.

But maybe the more cunning linguists out there could come up with something that would actually be workable.  I’d really like to be able to hold several different concepts in my head at the same time and work on them all together, with structures similar to mutex locks, semaphores, multithreading, and a whole bunch of other stuff that is very much foreign to the way most people view language.  But I think I’d actually find it rather a challenge.

Oh, by the way, regarding the structure of computer language?  Toss quantum computers into the mix and the whole thing doesn’t apply anymore.  They run on a completely separate model.  I wonder if we could do a similar thing with the human brain, through language.

Parallels Between Language and Computer Science

Makoto Ogawa is a former Morning Musume idol, who took a couple of years off of performing to go to New Zealand to learn English.  She recounted her experience in words similar to this (and I’m paraphrasing because I don’t remember them entirely):

I went to New Zealand to learn English, but in doing so, I found that I didn’t understand Japanese.  So I had to learn Japanese first.

As I’ve been thinking about how best for me to learn Japanese, I’ve been thinking deeply about the underpinnings of language, and I’m reminded of computer languages.  I know probably ten languages, and I’m proficient in probably five or six (though I’ve been out of practice in a few).  I guess this makes me a CompSci polyglot.  But I started thinking about the differences between computer languages.

Take these two examples:

#include <stdio.h>

void main(int argc, char *argv[]) {
 int i = 0;
 int result = 0;
 for (i = 0; i < 5; i++) {
   result += i;
 }
 printf("%s", result);
}

and:

result = 0
for i in range(0..4):
  result = result + i
print(result)

The first example is in C, the second example is in python.  Please excuse any syntax errors, I did not compile or run them.

In case you don’t understand programming, let me explain:  both of these examples will do exactly the same thing. (Possible syntax or logic errors notwithstanding).  Both will take all the numbers from zero to four, add them up, and print the result.  So if you look closely, you can see common syntax and structures.

But they are not the same.  Each language engenders specific design choices of the people who designed the language.  In the second example, for example, the indents are absolutely important.  If you do not put the indents in the code, it will not work.  In the first example, the indents are optional.  The important structures to serve the same function are the curly braces.  They both serve the same purpose, but the python developers wanted to enforce what they saw as good coding style, while the C developers wanted to… well, I’m not sure what they wanted to do.  I suspect they just had to come up with something and did.  There’s probably a historical reason for it.

But that makes my point for me:  the C developers were pragmatic, while the python developers enforced a particular cultural aspect through the use of language syntax.

What does this have to do with Japanese?  Or any other language, you may ask?

Well, think about the difference and similarities between Japanese and English.  We focus on the differences (and we’re right to), but there are many similarities as well.  They share specific parts of speech, even though the way one marks those parts of speech is different.  They share specific concepts, even though the words are different (“look” vs. 見, for example).  But they both share common human experience.  There is, generally, a one to one correspondence between concepts, just as there is generally a one to one correspondence between concepts in computer languages, with the only differences between the languages being esoteric, with a few fundamental cultural differences tossed in.

So what was Makoto Ogawa saying?

The trick to understanding a different language is to understand yours.  The reason being that once you know how yours works, the rest is, literally, just semantics.