The Shakespeare Programming Language (SPL) is a programming language which intends to make computer programs read like, well, Shakespeare.
The specifications are entertaining, to say the least. All variables need to be declared in the opening section “Dramatis Personae”, and they can’t be named just anything; they should be named “Hamlet” or “Ophelia” or some other Shakespearian character’s name.
To really see what they’re getting at, here’s an excerpt from the section on how to express constants in SPL:
Any noun is a constant with the value 1 or $-1$, depending on whether it’s nice or not. For example, “flower” has the value 1 because flowers are nice, but “pig” has the value $-1$ because pigs are dirty (which doesn’t prevent most people from eating them). Neutral nouns, such as “tree”, count as 1 as well.
By prefixing a noun with an adjective, you multiply it by two. Another adjective, and it is multiplied by two again, and so on. That way, you can easily construct any power of two or its negation. From there, it’s easy to construct arbitrary integers using basic arithmetic, such as “the sum of $X$ and $Y$”, where $X$ and $Y$ are themselves arbitrary integers.
For example, “the difference between the square of the difference between my little pony and your big hairy hound and the cube of your sorry little codpiece”. Substituting the simple constants with numbers, we get “the difference between the square of the difference between 2 and 4 and the cube of -4”. Now, since the difference between 2 and 4 is $2 - 4 = -2$, and the cube of $-4$ is $(-4)^3 = -64$, this is equal to “the difference between the square of $-2$ and $-64$”. The square of $-2$ is $(-2)^2 = 4$, and the difference of 4 and $-64$ is 60. Thus, “the difference between the square of the difference between my little pony and your big hairy hound and the cube of your sorry little codpiece” means 60.
As you see, this way of writing constants gives you much more poetic freedom than in other programming languages.
I think that it would be a bit of a nightmare to have to program anything (can you imagine a GUI app?) in SPL, but you have to have a bit of respect for a programming language with the goal of giving you “poetic freedom” in writing constants…
