Re:Essence: Desktop operating system built from scratch
by gk1256 on Saturday January 15, 2022 @08:56PM
(#29952527)
I like the UI, but I'm disappointed to find that the author is using orthodox C++ instead Modern C++
[ Parent
| on HN ]
Re:Essence: Desktop operating system built from scratch
by garaetjjte on Saturday January 15, 2022 @10:18PM
(#29952924)
I guess they don't want to kill their compile times.
Re:Essence: Desktop operating system built from scratch
by phendrenad2 on Saturday January 15, 2022 @11:42PM
(#29953419)
For 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.
Re:Essence: Desktop operating system built from scratch
by gk1256 on Monday January 17, 2022 @06:49AM
(#29965631)
Both. 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.
Re:Essence: Desktop operating system built from scratch
by ncmncm on Monday January 17, 2022 @12:07PM
(#29968724)
It 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.
Re:Essence: Desktop operating system built from scratch
by __float on Saturday January 15, 2022 @09:02PM
(#29952572)
What do you mean by "orthodox C++"?
Re:Essence: Desktop operating system built from scratch
by ani-ani on Saturday January 15, 2022 @09:10PM
(#29952612)
"Although the operating system is written in C++, most C++ features are avoided."
From https://gitlab.com/nakst/essence/-/blob/master/help/Contribu...
Re:Essence: Desktop operating system built from scratch
by ncmncm on Monday January 17, 2022 @12:14PM
(#29968806)
Yes, 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.
Re:Essence: Desktop operating system built from scratch
by fault1 on Sunday January 16, 2022 @12:27AM
(#29953655)
Usually orthodox c++ looks something like:
https://gist.github.com/bkaradzic/2e39896bc7d8c34e042b
this is from bgfx
Re:Essence: Desktop operating system built from scratch
by badsectoracula on Sunday January 16, 2022 @08:03AM
(#29955668)
> 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.
Re:Essence: Desktop operating system built from scratch
by fault1 on Sunday January 16, 2022 @01:00PM
(#29958239)
It'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.