Compiled languages like C, C++, Java, C# and many others claimed for faster performance stayed behind in popularity and adoption compared to JavaScript, PHP, Python etc. This article is focused more on small business applications and prototype products.
It appears just faster performance is not enough for every product.
Slow compilation time
Compiled languages outperform scripted languages when executing, but compilation time is slower. So creating and distributing product is often very slow. For example, Chromium written in C++ to build Chrome browser is very huge and compiling and running all unit tests span couple of hours.
Different binaries
Compiled languages binaries are different for each type of CPU/Device Architecture, though Java and .NET tried to solve it using intermediate binaries, but there are always many issues at runtime. So the distributions become large in file size and interdependencies become very high. And size of source code is often small compared to binaries.
Strict Typing
Most compiled languages often have very strict typing restrictions, which makes source code very large and every type of business data requires huge set of metadata to deal with (e.g. classes and properties). And often little mismatch in type in dependent library can halt entire project.
Slow loading
This might sound wrong, but compiled binaries are loaded all in memory even if you are going to execute code from one single file. Java has solved this by choosing one file per class and by allowing executing single class file. But in C/C++/C# all need to load entire module to start executing the code. Where else single file based scripts are easy to load and run as it will only execute the imported files instead of all the files of the project. Though you can achieve this in compiled languages but it requires lot of maintenance and extra code to do everything.
Difficult to debug in Production
Compiled binaries are often very difficult to debug, leading to crash and in production, Java, .NET, and every other compiled languages strip off debug symbols being too big. Which leads to nightmare in finding root cause of errors in production. There are ways to include debug symbols, but often when you deal with third party libraries without symbols. .NET also tries to load and compile relevant files only as needed, but version mismatch can prevent entire application from loading.
Difficult to Prototype
If product requirements are changing constantly due to changes in the market, or a new product is designed by research team, slow build time can exponentially delay the product. This was the primary reason for people to adopt Python, PHP and JavaScript over Java, C# for web projects. .NET is trying to catch up here, but it still has slow botting time, and lack of source code is often roadblock in debugging.
Lack of source code
Products shipped with compiled binaries do not ship source code, and they are often hidden to enforce licensing, but it makes it extremely difficult to find bugs.
On other hand, Python, PHP, JavaScript are distributed in the source form, even third party libraries (unless they are compiled to native for performance) are also shipped in source code form. Which makes it easier to analyze bugs.
Also dynamic typing reduces overhead of type checking at compile time, if the dependent code isn't used which has type mismatch, other code will still work correctly.
Like | Comment | Save | Share |