DEV Community

Daniil Baturin
Daniil Baturin

Posted on

Is "written in $lang" a feature or an implementation detail?

Some keep arguing that "written in $someLanguage" is a minor implementation detail that should not matter to users. This can only possibly be true for applications (as opposed to libraries). However, is it actually true?

On the surface is sounds plausible: you can write good software in any language, so if you aren't going to modify the program, it shouldn't matter.

However, in practice there may be very valid reasons.

Performance and startup time

It's no longer true that "interpreted" languages are orders of magnitude slower than ones that are compiled to native code. JIT compilation and modern VM designs can make them almost as fast to run as native code.

However, those improvements have done almost nothing to the startup time. Interpreter/runtime startup cost still ranges from "non-trivial" to "atrocious".

For web backend and for most desktop apps, startup time isn't very important. For CLI tools and programs designed as building blocks for scripting (like jq) it may be crucial.

Safety guarantees

For some use cases, memory safety provided by a garbage collector or a borrow checker is important enough to sacrifice something else for it. Security-sensitive public-facing services can benefit from a rewrite in a memory-safe language just because that way you know that a next Heartbleed is not lurking in your codebase.

For a larger set of use cases, "does not segfault" is a useful property too, since it's easier to avoid data corruption in that case.

Ease of installation and maintenance

If a program is written in Go, you know it's most likely self-contained and statically linked. You also know that it doesn't support plugins or live patching.

If it's in Python, you know that special effort is required to create a self-contained package. However, you also know that you can load code run time, or edit a program on disk.

Platform support also varies. If your target platform is an IBM mainframe, and a program you want is written in a language that only has an interpreter for x86 and ARM so far, you know you are out of luck.

Conclusion

"Written in $language" can be a valuable piece of information at the very least.

It's not to say that there are no projects whose only "advantage" over predecessors is different language—not even always a suitable one. But dismissing the language argument uncritically can be equally silly.

Top comments (0)