Software heresy: Identifiers with whitespace

A green thought bubble
Identifiers should have whitespace in them.

As best as I can tell, the reason whitespace is forbidden is tradition; no one has considered the possibility since the beginning of time. If a sequence of whitespace were identical to a single space, the problem cases are not too difficult to solve.

In C and C++, the problem case involves declaring a variable. This case is so stereotyped that solving it universally would not be difficult. The problem has a type name followed by the name of a variable. One solution would use the longest matching type name and then use the rest of the text as the identifier name.

class fish { }
fish red fish, *blue fish,
typedef char *red herring[];
red herring for hounds;
red herring &mackerel;

A language that allows whitespace in identifiers would have more descriptive type names and variables names. Camel case and Hungarian-like notations would be unnecessary. Detailed semantic information could be included in identifier names.

Operating systems, loaders, linkers, assemblers etc. that aren’t capable (yet) of handling spaces in identifiers can easily have the symbols with whitespace mangled so that they don’t burp. However, languages such as Scheme and Haskell are difficult to apply this extension.

Heresies like this need to be promptly stamped out.