In my career, I’ve developed professionally in Python, Java, Objective C, Swift, C#, C, Assembly, C++, TCL, Perl, JavaScript, PHP, Scheme, Racket, Haxe, ActionScript, Lua, and more. I love them all, and I love switching between them – I enjoy seeing the subtle nuances of language design. It’s almost like a window into the mind of the designer. Some might say that career-wise, it would be better to specialize in one language. Often the phrase “Jack of All Trades” is followed up derisively with “Master of None.” Obviously I disagree, and here’s why.
When someone asks me what type of development I do, I say “all types.” Sometimes they nod and move on because they’re just making conversation. Others will probe deeper and ask about programming languages. I say “all of them.” That is clearly hyperbole, but in a very real sense, I mean it. Or rather, I mean the opposite.
What language do I develop in? None of them. You might as well ask, “In what language did Plato philosophize?” Well, he spoke and wrote in ancient Greek, but his ideas make just as much sense to those of us who don’t know a word of Greek. The ideas are universal; the language is the medium to communicate those ideas. Likewise, programming concepts are universal and the programming language is the (often clunky) means to communicate – to fellow developers and to the machine.
And yet… And yet, it’s not so simple, is it?
When I lived in Italy, one of my breakthroughs in learning Italian was learning to “think in Italian.” That is, rather than composing a sentence in English and then translating it into Italian, I could bypass English altogether. I found that, besides improving my fluency and conversation speed, something magical happened: my thinking changed. It became more nuanced about certain things, more metaphorical, more poetic. Concepts changed and differentiated. For example, if there are two words in Italian that correspond to just one in English, my Italian-speaking self would see those things as two separate concepts – suddenly it seemed silly to me that knowing a person (conoscere) and knowing a fact (sapere) would be described by the same word.
And it worked the other way too. Why yes (I would think), a pumpkin really is just another type of squash. (Zucca gialla and zucca.) And yes, the English term “belly button” is quite funny. When I was younger my parents took a language course from a Professor Lee, who also taught several other languages. They would describe in comical terms how his body language, tone of voice, and even personality would change dramatically as he said goodbye to the Arabic students and hello to the Italian students. It felt that way to me, too, like I was donning another self.
But here’s the really magical part: the ideas stuck. Even when I came back to speaking English, it was with a deeper awareness of the nuances in what it means to “know” a person or a fact. I found myself thinking in Italian and then translating into English at times – times when the Italian language offered more expressiveness. And there were times when I wanted to say something – when I had the perfect phrase, the perfect word, in Italian – but I just couldn’t find a way to say it in English, so I had to lasciarlo perdere and come up with a close approximation, or risk confusing my listener.
But this is a programming blog
So it’s time to bring the parallel back to the concrete. When you work in a programming language, platform, or paradigm, you get in the habit of thinking in that language. If you’re a C programmer, you think in terms of functions, pointers, loops. If you stick to Java, you think in terms of classes, objects, references, but maybe miss out on understanding what goes on behind the scenes.
Knowing C will make you better at Java, just as knowing the Latin roots of words can improve your English. And of course it works the other way too. Back in my embedded software days, being limited to C felt constricting, but by “thinking in C++,” I could use object-oriented principles – something that is eminently possible in C with good discipline. The result being what my boss at the time called some of the best-organized C code he had ever seen.
It helps us all
If you’ve been in the industry a while, you’ve seen languages evolve. C# and (slowly) Java are incorporating more and more functional and dynamic paradigms, things we used to only see in Lisp or scripting languages. JavaScript is now bringing in keywords for classical-style inheritance. These are positive (if at times controversial) changes.
I believe none of this would have come about if it weren’t for polyglot programmers. Java folks were forced to learn JavaScript for their sites’ front-ends. After some kicking and screaming they realized, “Hey, this language has some cool concepts.” Coming back to Java, but still thinking in JS, they thought, “Where are my closures? Where are my dynamic types?” Then, instead of saying lascialo perdere, they pushed back and the language itself evolved, becoming more expressive and powerful.
It’s important to emphasize that this happened because of the rank-and-file coders, not some Ivory-tower language designer. Do you really think Gosling et al didn’t know about closures when they designed Java? Of course they did, but we weren’t ready (at least in their opinions). It took us Jacks of All Trades to push for change, to think in JavaScript, or Lisp, or Ruby. Knowing a diversity of languages makes us all better programmers, and it makes programming better for us all.