Polyglot Programming and the Benefits of Mastering Several Languages – Analytics Insight

Did you know that there is a group of African languages where there are no separate words for green and blue?Micha Mela, a fan of natural language grammars,asks me.

In Russian, on the other hand, there are two words for blue: one is dark blue and the other is for the color of clear sky. It has been experimentally proven that these language features translate into the practical ability to recognize colors. Language influences how we perceive the world. The same applies to programming languages.

Micha is not only a fan of neurolinguistics, but also a professional polyglot programmerhe knows Java, Groovy, Kotlin, Scala, JavaScript, some Ruby, Python, and Go, as well as curiosities such as Ceylon and Jolie.

Where did the idea for such a range of competencies come from?In the world of professional programmers, there is a controversial statement that almost every seasoned developer has come across: a good programmer should learn at least one new language a year.

This opinion is over 20 years old and was formulated in the bookPragmatic Programmer,a classic that invariably inspires successive generations of IT specialists.

The idea of learning a new language each year was controversial as early as 1999 when it was articulated, but today the situation is becoming even more confusing. Multiple languages can be used in several ways. Functional and object-oriented programming, even in the same language, can be a more unfamiliar experience than simply learning a new language from the same family.

Whats more, even within the monolingual ecosystem, there are frameworks that differ so far in their philosophy that switching between them is like switching languagesjust compare React, Angular, and Svelte.js.

Despite the controversy, every experienced programmer can code in more than two languages, and some of the code in several or even a dozen languages.

For some of them, its a side effect of functioning in the world of dynamically developing information technology; for others, its a conscious choice. The best engineers Ive worked with often repeat the same mantra: Im not a Java/Python/JavaScript programmer, just a programmer. Languages are my tools.

Have polyglot programmers had the opportunity to use so many languages in their professional life? Mostly yes, although the greatest enthusiasts also learn experimental and historical languages, with no prospects for commercial use. We are talking about languages such as OCaml, LISP, Haskell, and Fortran.

Its worth adding that the above does not include esoteric languages, i.e. those belonging to the just for fun category: Whitespace, LOLCODE, or Shakespeare.

So, what motivates these developers to learn new languages? The first answer is far from surprising. I remember Rubys fall,Marek Bryling, a programmer with over 20 years of experience,tells me. People who have been in software for a long time have to learn many languages over the years. Thats the reality.

The younger generation is also familiar with the memento Ruby argument.The decision to learn a new language is about career planning and risk diversification.Just look at Ruby, Micha says.

Most often, however, the people I spoke to learn new languagesad hoc: by encountering new technological or market challenges. The labor market used to be different than it is today. It was often easier to find a job in something completely new,Kamil Kierzkowski, a senior full-stack developer at STX Next,recalls.

So is learning new languages simply opportunistic adaptation to the labor market? Absolutely not! New languages clearly have the power to shape programmers, redirect their thinking, and broaden their horizonsand thats not the only advantage they bring to the table.

Let me quote a classic, Micha clears his throat as he quotes Edsger Dijkstra, a pioneer of computer science. It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

As you can see, the battles of the supporters of individual technologies go back to the pre-internet era. It turns out that in the world of polarised opinions, being a polyglot can be very helpful. I know enough languages to know what suits me,Marcin Kurczewski, an expert in over 10 programming languages,tells me. Knowing many schools of programming gives me perspective.

Having this broad horizon allows you to form your own opinions about technology, but it also gives you the advantage of being more exposed to new products.

Its obvious for Python programmers to use Prettier, Black, and other codes autoformat tools, Marcin points out. When I recently started contributing to an open-source C/C++ project, I was surprised to discover that the projects technical leader rejected similar tools that are now becoming popular in the C/C++ world. He used arguments that Python zealots used 10 years ago.

Micha echoes him: Java8 finally introduced Lambdas. A lot of purists complained:What have you done? You have destroyed this language!he laughs. I knew Lambdas from a different language, I had already figured out what their advantages were, and I quickly got the hang of using them in Java.

Interestingly, today, when more and more people begin their adventure with programming from high-level languages, it turns out to be invaluable to gain experience starting from the very basics.

For example, working with C++ helps. Thanks to C++, I understood how my computer and everything I run on it works, Marcin continues. Knowledge of concepts such as stack, heap, registers, memory management is useful in working with a computer, no matter what language you use.

Marek supports this opinion and gives a specific example from his own area of interest: Python has an interesting feature: weak references that dont increment the garbage collectors reference count. This is a very useful mechanism, but most people dont understand how it works because they dont know memory management from other languages.

This trail leads us tothe strongest argument for learning new languages: this practice develops the programming skills we use in the main language we specialize in.One developer convinced of this isMaciej Michalec, author of the polydev.pl blog.

Problem-solving approaches in different paradigms differ significantly, he notes. Python is a nice example of a language where you can write in an object-oriented and functional manner, and its useful to know the different paradigms from other languages so that you can use them in Python.

Thanks to the fact that I know how something is done in one language, I can better implement it in Python, Marek adds. Thats how async.io was created, being mapped from the node. This flow of inspiration is possible when we know several languages and this knowledge goes beyond the syntax itself. Its like travelingthe more countries you visit, the more your mind opens up, he concludes.

In our conversations, we also delve into the topic of the future. What new languages and frameworks will be created and popularised on the market? Who will create them? Is it possible that polyglots will also play their part in this avantgarde programming?

Definitely, and especially those who like history, Marek says. After all, in recent years, we have gone back to the 1960s and we are processing what was invented then: event architecture, microservices, functional programming, he says.

The cloud? Its an extension of mainframes. Even dockers result from processing our previous concepts, such as JAIL or LXC containers. What finally grew out of it was Docker.

So, whats ahead? What other languages will gain popularity? Will there be more or fewer of them? Opinions are divided.

I can see a certain consolidation trend in relation to a few languages like JavaScript and Python, but in my lifetime, we wont get to any programming lingua franca,Marek says. I am concerned, though, that in some time 90% of programmers will only be able to do high-level programming. The same is already happening with DevOpsfew can still work on bare-metal because everyone migrated to the cloud.

Were not threatened by monolingualism, Maciej concludes. PureScript and V are exciting new players. There will be more and more new languages, but at the same time, it will be harder and harder for them to breakthrough. Today, a rich ecosystem and the support of community developers are of key importance for any language. You can see it in Scala, he sighs.

I love this language, but the community is very hermetic and pushes out those who havent been dealing with functional programming before. This affects the popularity of the language more and more.

The issues of community and ecosystem are also raised by Marcin, who is sceptical about Crystal, another contender in the crowded arena of programming languages. Crystal is a compiled Ruby, and its an interesting idea, but even the nicest, cleanest programming language is nothing without a solid ecosystem, which is missing there.

It seems that programming communities will decide the future of programming languages in a very democratic way, voting with their feet (or rather, with their fingers on the keyboard). In this vote, polyglots also have an advantagethey get more than one vote.

Author

Marcin Zabawa Director of Strategic Services, STX Next

See more here:
Polyglot Programming and the Benefits of Mastering Several Languages - Analytics Insight

Related Posts
This entry was posted in $1$s. Bookmark the permalink.