Implemented in

The first time we learn a new programming language, we can become temporary blind for anything that isn't directly syntax-related. This is because we often focus on getting started as fast as possible. When millions of websites are dedicated to this, then it's actually getting harder. We seek to understand the concepts of the language, the patterns they are subjected to and the ways in which they can be applied in the real world. Buried in countless lines of text, we think that we know what we are looking for, which causes us to filter out what we perceive as less important. But we lack the initial context to know what's important and what not. Sometimes, we may need to repeat the same things over time and in different scenarios until we realize what they mean. The time and space difference of the information we gather as input can serve as a tension to emphasize certain recurring points that we might have forgotten.

When we read that a certain function in our language of choice is implemented in another language, we may find this confusing. This is exactly what happened to me when I was reading that a PHP function was implemented in C and was therefore fast. I just pretended that I haven't read this sentence, because all I wanted to know of was PHP. I didn't know how to interpret it since C meant just a letter to me. I lacked the context to be able to understand this, which caused me to forget it. A couple of months later I came across something similar and had a strange gut feeling that I might have heard this before. I wasn't entirely sure, but at least it made me suspicious.

Then another thing happened when I started reading about Python too. It was said to use functions implemented in C++. At that point I noticed that any language that I touched had something to do with C/C++. The similarity to PHP made made me more curious why this appeared again and again. Then I realized how fast compiled languages can be, so it seemed logical to me that interpreted ones could use this advantage as well.

At the same time Emscripten and asm.js were making waves in the JavaScript world. The first takes a C++ code and compiles it into JavaScript and the second is an optimized subset of JavaScript for faster code. Technologies like these allowed computationally-heavy games to run in the browser—what C++ would normally enable on the desktop. Lately, JavaScript has partially started to change syntactically and to acquire some C++ notation.

This shows that what started as an uninspiring sentence became a recurring pattern.

Now I think that if all these languages point to C/C++, then it might be beneficial to learn it too. Assembly is at the lowest level, but we really don't want to program with 0s and 1s when this isn't intuitive. With C++ we can benefit from the increased locality to the hardware, which can make our code run much faster. This allows us to have a greater flexibility in what we can do in a given computational time. If we write scripts that rely on a framework, which is a layer on top of an interpreted language, which uses the functionality of a compiled language, our code will be slower. We'll be able to do less things, the size of our code will be limited, certain data structures might not be available or their usage may become resource-heavy. We won't be able to understand what is happening at a lower level or change the implementation to suit our needs better. Our only gain would be speed of development, since every additional layer will add its own convenience mechanisms. Essentially, we trade developer convenience for response speed.

There is no perfect language—each one has its own limitations and we need to consider what we want to do before we choose the best one for the task. But we can stay aware of the patterns that show us where we gain or lose flexibility. "Implemented in" allows us to distinguish between "producer" and "consumer" languages and to seek efficiency at the most appropriate level.