Menu Home

Shakespeare: the programming language

Shakespeare

John Taylor [Public domain], via Wikimedia Commons

One of many programming languages designed for aesthetic or comedic reasons, Shakespeare writes code in the form of Shakespearean plays. Variables are declared in the dramatis personae, Acts and Scenes are goto labels, dialogue becomes code, and so on.

Here’s the beginning of a typical programme in Shakespeare:

The Infamous Hello World Program.

Romeo, a young man with a remarkable patience.
Juliet, a likewise young woman of remarkable grace.
Ophelia, a remarkable woman much in dispute with Hamlet.
Hamlet, the flatterer of Andersen Insulting A/S.

Act I: Hamlet’s insults and flattery.

Scene I: The insulting of Romeo.

[Enter Hamlet and Romeo]

Hamlet:
You lying stupid fatherless big smelly half-witted coward!
You are as stupid as the difference between a handsome rich brave
hero and thyself! Speak your mind!

 

Categories: Sciences Technology

The Generalist

I live in Auckland, New Zealand, and am curious about most things.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: