by jcelerier · 4y ago · 0 comments
On paper that sounds like you could do much of what we do today, maybe with a little more effort but it'd work, right? Nope. In those M-series builds DOM mangling routinely crashed the browser. "Ask me how I know". And likewise your Borland C++ 3.0 "support" for templates means a lot of basic stuff works but if you try to get fancy (and of course there's no guidance provided on what's "fancy") you will get spurious errors or blow up the compiler, or worst of all, silently produce wrong binaries...
More than that though, having templates doesn't magically fix this problem. jcelerier says C++ fixes it by offering "generic lists" in 1991. But... it doesn't. In 1993-4 Stepanov presents the STL to the committee, with what will become std::list but that's not an intrusive list. So you would need to do all the heavy lifting to build your own intrusive lists, they are not, in fact, supplied with the language.
Thus we'd be in the exact same place, with people arguing about the implementation, except that (from experience) C++ proponents would be saying what the kernel needs is yet more C++ features...
Or Rust existence depending on LLVM and GCC, both C++ projects, that will never adopt Rust as their main development language?
Better take care with the code generated by those C++ projects landing into the kernel as part of Rust runtime/stdlib.
that's where we disagree I guess - the heaviest lifting you could do in C++, assuming zero standard library, is to me still orders of magnitude better, more readable and more maintainable than whatever can be done with macros in C.
Also I was asking a particular person to because their perspective would have been interesting to me, but if you're also a kernel developer I would be interested to hear your gripes too.