Monday, January 28, 2008

Polyglot Programming Parallels Perched Precariously per Patron Participation

I just finished delivering my Software "Engineering" & Polyglot Programming keynote at the 2nd installment of CodeMash, and I got lots of great feedback from it. And it was the feedback that's useful, not the welcome but ultimately less than useful "I really loved your keynote". As I had hoped, some of the attendees took my remarks as a starting point and expanded upon what I said.

One good example of this is from Nick Watts. He sent me a long email, following up with blogged thoughts here and here. To summarize Nick's points, he noticed that many great writers will use phrases from other languages when the native language just won't do. I discussed this in a blog entry about Ruby syntax, but in this context it is more about polyglot programming than about Ruby. Nick notices it in Tolstoy's War and Peace, where the English translation leaves the French phrases alone. The first time I really took notice of the pervasive use of foreign phrases was in Nabakov's Lolita (which isn't translated, it was written in English), where the author uses so many French phrases that it distracted me at first. But then, I started looking up what the phrases meant, and it turns out that Nabakov was able to utilize phrases that just dripped with connotation with well placed French colloquialisms. "Joy of Life" as a translation for "Joie de Vivre" is a poor, hopelessly literal translation, missing all the rich connotations of that phrase. Another recent example popped up in the excellent book I'm reading called The Rest is Noise: Listening to the Twentieth Century by Alex Ross. He uses the phrase "Fin de si├Ęcle" over and over, but it carries much deeper meaning than just "end of the century", because it captures with it the connotations of what was happening then.

When I was an inexperienced reader, foreign phrases like this annoyed me, because I had to go look them up. Isn't English good enough? But as I've become a more experienced reader, I understand that some languages have phrases (colloquialisms) that are simply more expressive in very compact form. Translated to software, we are so accustomed now to writing in our "One True Language" that seeing other mixed in languages is off-putting. But, as we become more versed in polyglot programming, we'll see more opportunities to leverage appropriate colloquialisms in other programming languages to add to the expressiveness of our solutions without having to spell everything out in excruciating detail.

Thanks to Nick for not just listening to what I had to say, but listening to what I had to say. There is no greater reward for a speaker.


Mark Kerzner said...

And I was struggling for the purity of language all my life! But Nabokov, Tolstoy, and Alex Ross, together with Meme Agora, convinced me otherwise.

Shih-gian Lee said...

All are good points. For someone like me who knows several languages, it is important to understand the culture behind every language in order to express it properly. I guess, I just need to find out when should I use one programming language over the other in order to use it efficiently.

erickreid said...

spot on analogy for the basis/virtue of polyglot programming! saw posts on serverside the other day seeming to bemoan recent change for TSS going multilingual and could not understand the perceived down mood. serendipitously, i'm taking advantage of time off from school to catch up on book reading. made your analogy for experience levels in the reader and cultural translations all the better!