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

An orgy

“The advancement of science and the rationality of politics are interwoven in a social process that, in the perspective of a more distant f...