There are specific reasons why the Neulite kernel is written in C17, especially in an era where tools like NEST and Arbor are written in C++ from the start, and even NEURON is being rewritten in C++.
Reason 1: The Kernel’s Limited Scope
The Neulite kernel is not a complete, standalone application. It is a small piece of code designed only to perform numerical calculations. The advanced features of C++ are simply unnecessary here. The features that require advanced programming capabilities belong in the front-end components (Bionetlite and BMTK), and since those are written in Python, they have access to features far more advanced than C++ can offer. In my view, Python + C17 >> C++.
Reason 2: Code Predictability and Simplicity
The C specification is small and concise, which allows developers to have a reasonably good prediction of how the code will be translated into assembly language. This is not possible with C++. It is, in fact, virtually impossible to grasp the entire C++ specification.
Reason 3: Following a Successful Model (The Linux Kernel)
The development style of the Neulite kernel mimics the style of the world’s most scalable software: the Linux kernel. It is best to follow a proven success story. The Linux kernel is written in C, and I believe Linus’s reasons for continuing to use C are fundamentally sound, a point he has recently reaffirmed. Furthermore, the choice of the GPLv2 license is based on the same reasoning.
Reason 4: Minimizing Dependencies for Specialized Hardware
When running a kernel on specialized computers like supercomputers, dependencies on external libraries and applications are the enemy. The make utility is included on virtually every machine, but cmake is not, and its installation creates additional, unnecessary work. Depending on Boost, for example, would result in infinite pain just to get the system running. Is it not absurd to depend on things like Matplotlib or MPI just to perform a numerical calculation for a single neuron?
Reason 5: Alignment with the UNIX Philosophy
The design of the Neulite kernel is heavily influenced by the UNIX philosophy:
- Do one thing and do it well (numerical calculation only)
- Choose portability over efficiency (zero dependence on external libraries)
- Store data in flat text files (CSV files)
These characteristics make the kernel agile and maneuverable, which is what enabled the full cortical simulation of the mouse brain on Fugaku. This direction is the complete opposite of the approach taken by C++, which is oriented towards developing giant, complete and standalone applications.