Monday, June 08, 2015

PL/I weirdness

Apparently, this was perfectly legal code in the programming language PL/I:

IF IF = THEN
    THEN THEN = ELSE
    ELSE ELSE = IF

The language just guessed when you wanted a string to be a keyword and when a variable, so that the second 'IF' was assumed to be an entirely different animal than the first one, and so on.

(Source: P. J. Plauger, Programming on Purpose III, p. 28)

No comments:

Post a Comment

Why so many died

"Tired of waiting for heaven — that is, for a condition where the transcendent would no more have to compromise with the immanent — th...