I find this somewhat mind boggling:
By comparison, the original macOS (10.4) was 80 million lines of code.
Is Apple bloated? They pretty much run Apple peripherals so I wouldn't think drivers should be eating up that much space.
I am way to 'frugal' to have Apple anything.
I wonder... does these counts include code comments and empty lines? Some coding styles (e.g. line length) could force one line to span across multiple!
40 million for a 34 year old kernel doesn't sound like a lot compared to ~32 million for a 16 year old Chromium browser! [1]
I'm just a casual user. I didn't know there were that many lines in all this stuff. And I don't use Chrome/Chromium as I suspect a lot of those lines report back to the mother ship, Google.
Back when I was paid to write code as a contractor, our running joke was that we had 400,000 lines of compiled code. About half of that actually worked.
Thats a great sign - that takes a lot of developers and contributors!
I'm guessing that 40M includes a lot of driver and hardware support - and that its APIs and a lot of the filesystem pieces (even though they do add new ones every now and then) havent grown at the same rate.
It includes everything, code, comments, blanks, even documentation source files.