One way in which a computer language can be evil is to have it treat whitespace in a special manner. The normal way of dealing with whitespace is to treat all sequence of whitespace characters the same way (as some kind of token separator, usually). Languages which do otherwise are often a pain to program in. Some little languages (like command shells) are justified in doing this (it is expected that the end of the line will terminate a command!). But it's almost never OK to make specific demands for horizontal whitespace (spaces and tabs). Amazingly, people are still performing this crime against ASCII!

Here's an incomplete list of the offendors:

Horizontal whitespace is completely removed from your program! So you can say "GO TO" for "GOTO", but also
       DO 100 X=1.10
might not do what you think it does (note that's a period, not a comma!).
Horizontal whitespace is used to specify block structure. However, a sane alternative (of using braces {...} to delimit blocks) is provided, but looks a bit funny.
Horizontal whitespace must be used to specify block structure. Yuck.
A very special type of horizontal whitespace must be used for command lines in the makefile: the first character of the line must be a TAB. Even 8 spaces won't work, but they'll look the same on your screen. Failing to do this leads to "amusing" errors.

I'm sure many more examples of this idiocy exist...
A language like FORTRAN is also problematic if you need to write a parser/compiler for it.

The well-known assignment mentioned above (DO10I=1.10) is as awful as something like IF(1.EQ.J) - as you have to look ahead in your input stream. Continuation cards make things even worse - so do lesser-known facts ( every character but space and 0 are continuation characters). Besides, being able to write CO N T IN UE instead of CONTINUE is not something you'd ever need - nor is it helpful to spread "STOP" on four lines using continuation characters.

With Fortran 77, first compilers appeared which were less strict when it came to formatting (based on punched cards) and even allowed multiple statements on one line separated by a semicolon. (Besides, the use of INTEGER or LOGICAL arrays for character handling fell out of fashion with the introduction of CHARACTER).

Japanese. Well, not all whitespace is irrelevant, but words in sentences are not required to be separated by spaces. In the kanji writing system, a word's function in the sentence is indicated by a particle (a very small word which proceeds it). Particles indicate objects and subjects of the sentence, as well as many notions that are expressed in English through prepositional phrases. When kanji is written horizontally as western languages are, periods and spaces are used as in English to denote the end of sentences. However (although I'm not entirely sure about this), no periods or spacing are required when using the antiquated, stylistic vertical method of writing kanji.

Log in or registerto write something here or to contact authors.