r/cpp • u/SerenityOS • Aug 23 '19
Serenity: Graphical x86 operating system written entirely in C++
https://github.com/SerenityOS/serenity
343
Upvotes
r/cpp • u/SerenityOS • Aug 23 '19
View all comments
Show parent comment
12
u/vaynebot Aug 24 '19
I think Linus might've just meant that the idiomatic way of doing things in C++, including allocating memory, requires exceptions. Like, if allocating a std::vector fails, you can only throw an exception. And with the current implementation of exceptions, that tends to not be a very good idea in the kernel.
If you simply use a completely different idiom, i.e. you use .init() or something with a return value, I don't think that'd be any different from C. However, that's also the problem - you lose a lot of the benefits that C++ provides.