3 ms·
> The core kernel bit is written in C This is untrue. Where did you get it? Have a look at kernel scheduler written in C++ here: https://fuchsia.googlesource.c
by sanxiyn 5y ago
> The core kernel bit is written in C
This is untrue. Where did you get it? Have a look at kernel scheduler written in C++ here: https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/zircon/kernel/kernel/scheduler.cc https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/z.... constexpr! namespace!
- vlovich123 5y agoOh huh. It must have moved on significantly from when I last looked at it years ago. It started of based largely on LK work. If you look at the old code [1], it has a C++ extension & is likely compiled with a C++ compiler but the code itself is really just C. That's why cloc sometimes isn't an accurate tool for these. I don't have a sense of what the policy is but they could still be sticking with the C convention w/ C++ only utilizing things like constexpr & various other compiler pieces. They do seem to be making use of templates so it looks like there's been a lot more modernization done there. [1] https://fuchsia.googlesource.com/fuchsia/+/9c7855e320662ad909903d2bef6a8e7c23dd5d90/zircon/kernel/kernel/sched.cc https://fuchsia.googlesource.com/fuchsia/+/9c7855e320662ad90...
- jyounker 5y agoIt would be wise not to confuse C++ at Google with C++. Google has extremely strong internal coding standards. Those standards restrict which C++ features can be used, and how and where those C++ features can be used. Without compliance based upon paycheck and performance reviews, I'm not sure that I'd want to try to make that kind of selective enforcement work.