2 ms·
The interesting thing is that the Zig build system could be implemented in a C/C++ compiler without any language changes. All that's needed is that (for instanc
by flohofwoe 2y ago
The interesting thing is that the Zig build system could be implemented in a C/C++ compiler without any language changes. All that's needed is that (for instance) Clang would have a new option `clang build` which looks for a build.c/cpp file, compiles that into an executable and runs it.
The actual build system functionality is 'just' an extension to the stdlib.
- pjmlp 2y agoIt could, but then it would be tied to that specific compiler and the platforms it supports. So is the mess of ISO defined languages, where compiler toolchains are an abstract concept. Also a good point to note that OpenGroup and POSIX never bothered to standardise UNIX package management.
- flohofwoe 2y agoYeah, just Clang doing its own thing would be useless. It would have to go through the C and C++ committees, at least for the stdlib parts (and this is basically the show stopper for the idea unfortunately).