I’m a poet, lover of literature, and budding Ruby student. Even as a lover of language, I never thought to explore computer language as a way to enhance my knowledge and appreciation… until I started working here. In writing code, you face similar obstructions as you do in poetry: context, line breaks, stanzas, even word-choice.
As I revise and revise a program I’ve been working on, I realize how the content of the program dictates the form, just like in poetry. A stanza and a block of code are both rooms within the larger piece. Indentation can be used as a way to signal a change (in tone, movement, concept) to the reader in both a poem and a program.
Look at these screenshots: one is part of a Ruby program and one is a contemporary poem. It’s hard to tell the difference!
I think it’s possible to compare the arc of a program to the dramatic structure of a piece of literature, like Freytag’s triangle. (Although, that’s another post entirely…)
How else do you see form across languages and genres?