A New Player in System Programming

 Traditional system programming languages are C/C++. In recent years Rust gain more and more attention in this area.

C is by far the most successful programming language on this planet. I tried it a couple of days ago in a small command line app. The mental model of a C programmer is quite different from the "high-level languages", such as Python, Java, PHP, etc. As a C programmer, you have to estimate the volume of data your app deal with constantly. How to fit the data into the memory, on the stack or heap? Do these estimation hold on any platform you want to deploy? When the estimation doesn't hold, what will happen by executing the current code implementation?

These questions are hard to answer, even for experienced programmers. Hence except for those performance-critical applications, few people choose C as the implementation language.

C++ was invented to make C "higher level". However, its main problem lies in that it's too ambitious and powerful. We know that the philosophy of Unix is small and beautiful. A small tool does only one thing and to its best. There're numerous tools on Unix/Linux that cooperate with each other to accomplish complex functionality. While modern C++ isn't one of them. It's more like a versatile superman. You can count on it whenever, wherever, but the learning curve is relatively steep.

Is it possible that there's a language that is easy to read and write like Python, at the same time with very high performance like C/C++?

The answer is YES. Among them, Nim is a rising star. I'm reimplementing my note-taking app "donno" with Nim. Hopefully, the size of the compiled binary created by Nim is about one-fifth of that created by Rust and similar searching performance.

Comments

Popular posts from this blog

2023: On the Road

Yet another advice to kids

The Joy of Reading in Natural Light