Wittgenstein 4. Language

I am a programmer and deal with a language every day. I even tried to come up with my own language a couple of times. The first time, in those olden days when there was no yet such a variety of programming languages to chose from. We tried to create a system that does not require knowledge of programming language in order to receive and understand the request for complex design work. Oh, those good old days when the first computer-aided design systems were built!

The second time, already in the 1990s, there was a hope that one can create a software system that understands requests for a new web-page design and build it on demand. We were even somewhat concerned that we can get ourselves out of business as an unessential middle man. I still think it is possible, but not in a way we tried to implement it by creating a macro-language.

Software gurus were talking about programming as modeling the real world. Well, there was a problem: before object-oriented (OO) languages were introduced, the intermediate results (the current state of the calculating process) were stored in “common” area in memory (shared by all the procedures in the program), which caused a serious headache. It was hard to coordinate which procedure should update the state and when, especially if there were defects in the code that updated the common area out of order. But the common area was needed to allow passing the intermediate results (state) between procedures that contributed to it.

OO programming languages addressed the problem by making state private and allowing it to be passed along with the procedures that changed it wrapped in a structure called “object” – an instance of a class.

Everybody started immediately saying that “now programming is a true modeling because a programming class is a model of a class of real-life objects; its instance – a programming object – has a state (properties) and behavior (ability to change the state and react to the state changes) like every object in the world does.” Well, the thought that programming objects have to interact and, thus, change the state of other objects, so the problem of shared state did not go away as was claimed (although became better controlled), was not voiced, probably because nobody dared to say it in the heat of the OO euphoria. Marketing and social pressure won again.

The mapping between objects in a program and the real-life objects was done by structure. We can disagree on color because each of us perceives colors slightly differently and this difference is not easy to measure, if at all. Structure, on the other hand, can be expressed in numbers: two eyes, two legs, four wheels. That’s why structure comes first when we think about similarities.

After the honeymoon was over and OO languages we put to test in solving many practical problems, it turns out that not all programming classes can be mapped to the classes of real-life objects. For example, some programming classes consisted just of the code that did calculations based on the input values. They did not use any state. The procedures accepted input and produced results based on them and the particular algorithm. One could say they were models of real-life processes, not objects.  If we need to calculate how far away the bullet will reach, we do it not in a way the bullet or the rifle does it. So the idea of mapping programming to real-life objects and processes started to break down.

To get over the OO limitations, functional programming – when calculating units (functions) are passed around without state – was added to some OO languages and affirmed the state of affairs: yes, some programs do model real-life objects, but others are more focused on the calculations that cannot be mapped to real-life objects and processes directly. 

Now, look at these quotes by Wittgenstein:

– (Tractatus) human language models real world and reflects its structure; this way the meaning of a word/sentence comes from the real world;

– (Investigations) human language models real world; the meaning of a word/sentence comes from its usage in the real world.

Don’t you see the straight analogy with our experience with the programming language?

Wittgenstein (second from the right) in 1920

Exactly this change of the view on the language – from modeling structure to reflecting usage – was the primary motivation for Wittgenstein to write his second book Philosophical Investigations, where he introduced the notion of “language games“. He now states that the meaning of a word or even a sentence comes from the context of its usage. As an example he offers an exclamation “Water!” which may mean “it is water, not wine I expected” or “bring me water!” or “water is coming!”  

Don’t you see the analogy with an algorithm? The programming statement “int x = x + 1” (increment integer x by 1) may mean “add another dollar to an account” or “add another cow to the herd” or even “I like it even more.”

There is another notion in programming called “interface.” It describes how a calculating procedure can be called and how its result looks like. For example, “int multiply(int x, int y)” means that procedure “multiply” produces an integer as the result of multiplication x by y, when you pass the specific values: “multiply(2, 2)” will produce 4. The name itself (“multiply”, in this case) is usually meaningful but does not influence the result. It just describes for the programmer what this procedure does. The same procedure could be called “int doSomething(int x, int y)” and work exactly the same way as “multiply”.

There are many ways to calculate some things. One way produces a more precise results, another works faster, for example. So, there may be different implementations of the same interface. It allows us to plug in a different implementation of one element in a complex calculation (since the interface is the same, we always know how to call it and what to expect) and observe a different final result. Functional programming is focused on allowing this kind of constructing complex calculating procedures from simpler calculating blocks (functions). 

Each such a function can be used in calculations of a very different nature.  Its “meaning” – what does it actually calculate? height? weight? happiness?  – similar to the statement “int x = x + 1” – comes from the context.

[It is funny to notice that in my previous post I talked about bias towards the tools one knows the best. Currently, in addition to this topic, I write about functional programming a lot. So, there should be no surprise that I see functional programming in places, where I would not see it if I were a specialist in some other area. Would I find in Wittgenstein’s writings weather patterns if I were a weatherman? I think so. But I cannot help it. I do see the analogy to functional modeling in Wittgenstein’s writings.]

However, human language is a much more complex phenomenon than a programming language. Both are governed by syntax, but human language syntax is much more flexible. It even allows us to deviate from the rules (and even create new ones) all the time, as long as it helps us to convey the message and create in other people’s minds the image we would like to create.

That is why I disagree with Wittgenstein and his term “language games” as a metaphor for human language.  Games are governed by rules. If you change the rule, the particular game is not going anymore. 

Like any metaphor, “language games” metaphor can go so far. But I agree with his view that the meaning of a word or a sentence comes from its usage (context). I noticed that it is not possible to learn anything or teach anybody by using only general statements. We learn mostly from specific examples. Then we generalize them ourselves and it becomes our knowledge. A general statement can help us to generalize, but it cannot become a piece of knowledge without a specific example. Would you agree?  

The stories we tell – literature, art, myths – captivate and instruct us because they provide specific examples. That’s how we are different from machines. Machines just execute instructions. We refuse to do it until we get the meaning of the general statement from examples. 

That’s why, while writing about programming in my Java blog, I always try to illustrate concepts with code snippets. It worked quite well so far, I think. If you have read my Java posts, would you agree? 

Send your comments using the link Contact or in response to my newsletter.
If you do not receive the newsletter, subscribe via link Subscribe under Contact.

Powered by WordPress. Designed by Woo Themes