3 ms·
The issue so very many people fall into is assuming some foreign-looking codebase is awful. What people typically mean to say is something along the lines of "
by Alupis 3y ago
The issue so very many people fall into is assuming some foreign-looking codebase is awful.
What people typically mean to say is something along the lines of "I haven't a clue what this does, haven't enough experience with the language to understand it, or how people use it".
Go look at code written in "safe" languages like Rust and tell me you understand what it's doing any better than well written C code.
You have to know the language to understand what is sane or not, what the conventions are, what the common issues are, etc.
Same with all the Functional stuff out there. To a OO person, it looks bat poo insane. But if you learn FP, it's natural.
Some of your complaints are valid from the perspective of someone who doesn't do kernel work. For the people who do work on the kernel, the macros, abbreviations, etc are common place and well understood, and a complete non-issue.
- michaelsalim 3y agoI wish people see this more. It's so frustrating to see people pass judgement without even understanding the whole context. Maybe it's due to the lack of documentation sometimes. But many times it's just people not reading them.
- jiggawatts 3y agoFor reference, I have many years of experience with C, C++, Rust, and even Haskell. That kernel C code still looks awful to me. I've seen beautiful code in every language including C.
- eduction 3y agoYou’ve circled back to the same point the person you’re replying to was supporting: “ the problem is one of cultural context which is often not shared between generations of coders. “ There is no such thing as absolutely good code. It’s context dependent and context tends to be ephemeral. The Linux kernel is in some ways an exception, but also appreciated by a pretty small group. The rant against the kernel code is meant to be illustrative - if you don’t know the conventions, abbreviations, if you’re not operating in the context of an early 21st century OS, where memory is handled manually, none of this looks particularly great. Code is cultural and cultures are niche and ever changing. Particularly these days. The same technology that enabled the fast rise of, say, Ruby, or Go, or Rust makes your code and my code depreciate quite quickly.