Idiomatic Polyglot Programming


What the heck does that mean?

Looking at the title of this post might seem a bit confusing. I certainly didn’t know what idiomatic polyglot programming was the first time I saw it. There is also the question of it’s importance. stick around for this post and I will break down exactly what idiomatic polyglot programming means and why it is important.

Programming?

You probably already have a reasonable idea about the application of this term. Programming, in the sense that I am talking about, is typing a set of formatted statements that can act as instructions for the computer to carry out.

Polyglot?

If you haven’t heard the term before it might seem a bit strange. When broken down into poly and glot, the word still leaves us with little to go on. I know poly; that means many, but I’ve never seen glot before. According to some quick research online, glot means “having a tounge” from the Greek glottos. So, that would mean polyglot is having many tounges. When the concept is applied to programming it means being able to program in multiple languages.

Idiomatic?

Every time I see or hear this word I instantly think of two words, idiot and automatic. Unfortunately, neither of those words are particularly helpful in understanding it’s meaning. When applied to programming, I tend to think of being idiomatic as programming in the way of the language. So, for me it’s really more like programming a la mode. Which does not mean with ice cream. A la mode actually means “in the way”. Similarly, idiomatic means to have a distinct style or characteristic. So, programming idiomatically is programming in the style of the language and the community surrounding that language. Non-idiomatic programming would be akin to speaking Spanish words using English sentence structure.

Bibbity Bobbity Boo!

Put it together and what have you got? Idiomatic polyglot programming is programming multiple languages using each languages community and intended style. Now that you know what it means, you’re probably asking why it matters. Programming in multiple languages is important because not every language is right or every job. Adopting a community’s style is important because you are introduced to new paradigms that you didn’t know before. The benefit of new paradigms is that you can begin speaking Spanglish. Your C# can use a callback based approach. Your JavaScript can use classes. Your Ruby can use strict, although not language enforced, interfaces and dependency injection. Your Java can now use Lambdas. Your Haskell can have well named variables. The list goes on and on. There are a lot of paradigms that can cross into a new language community. You will never learn these paradigms if you just continue to program in your current language or if you program the new language as you have been programming in your current language.


Please Consider Sharing This Post:

FacebooktwitterredditlinkedinFacebooktwitterredditlinkedin