5 ms·
I like the UI, but I'm disappointed to find that the author is using orthodox C++ instead Modern C++
by gk1256 5y ago
I like the UI, but I'm disappointed to find that the author is using orthodox C++ instead Modern C++
- garaetjjte 5y agoI guess they don't want to kill their compile times.
- phendrenad2 5y agoFor the kernel, or for the user-mode applications? C++ features aren't very useful for kernels. Presumably the author is more familiar with C and "C with classes" C++ and someone can rewrite the user-mode apps in modern C++ later.
- gk1256 5y agoBoth. SerenityOS, includeOS, Managarm used Modern C++ for Kernel. For example, Managarm used coroutines and Templates also RAII stuff like lock_guard in it's kernel.
- ncmncm 5y agoIt is foolish to assert that "C++ features aren't very useful for kernels". C++ features are useful for programs, particularly big programs. Kernels are big programs.
- __float 5y agoWhat do you mean by "orthodox C++"?
- iqanq 5y agoIt reminds me of Carmack's subset of C++. In other words, it doesn't suck.
- ani-ani 5y ago"Although the operating system is written in C++, most C++ features are avoided." From https://gitlab.com/nakst/essence/-/blob/master/help/Contributing.md https://gitlab.com/nakst/essence/-/blob/master/help/Contribu...
- ncmncm 5y agoYes, this is kind of stupid. Certain people have been doing this sort of thing forever. It was never a good idea. Whenever you probe why they thought it was a good idea, all the reasons (where they are expressible at all) turn out to depend on falsehoods. Most usually, though, it amounts to laziness about learning anything new. You can see effective use of Modern C++ in SerenityOS, to excellent effect.
- fault1 5y agoUsually orthodox c++ looks something like: https://gist.github.com/bkaradzic/2e39896bc7d8c34e042b https://gist.github.com/bkaradzic/2e39896bc7d8c34e042b this is from bgfx
- badsectoracula 5y ago> UPDATE As of January 14th 2019, Orthodox C++ committee approved use of C++14. So it is basically Modern C++, just a few years later.
- fault1 5y agoIt's 2022, so perhaps the committee will approve features from C++17. Now, all things considered, having used bgfx in various languages, I think the Orthodox C++ approach leads to quite clean code.