next up previous
Next: Write, Compile, Run Up: Introduction Previous: The Idea of Language

Java vs.English

We know from the previous section that Java is much less complex than a natural language such as English, French, or Mandarin, but are there ways in which Java is similar to such a language? Well, both a natural language such as English and a computer language such as Java use words that are made up of symbols from an alphabet. Actually, we define the set of symbols that we are allowed to use to write a program in Java as the alphabet. This alphabet is different from the alphabet of any natural language, but in both cases there are a fixed number of symbols and only certain combinations of symbols (not all) produce words that are part of the language.

In both English and Java, words can be combined in certain ways - according to the rules of the grammar. This is also where they differ: the grammar of a natural language is much more complex than that of a computer language.

In terms of our goal in this course - learning the language - the main difference is that you can't practice your computer language by talking to other people, you can only practice by 'talking' to the computer (programming, that is). In both cases you need lots and lots of practice to be able to express yourself in the language well.

The good part about learning a computer language is that it is simpler than a natural language. The bad part is that the computer follows the instructions that you give it exactly, so you have to be very precise when you give it instructions. With a natural language, we routinely say things that aren't very precise and we rely on the intelligence of the listener to figure out the exact meaning. The computer has no intelligence - it just does exactly what you tell it - so you must be very precise.


next up previous
Next: Write, Compile, Run Up: Introduction Previous: The Idea of Language
Chris Trendall
Copyright ©Chris Trendall, 2001. All rights reserved.

2001-12-09