Live data from Hacker News

C++ in the Linux Kernel

threatstack.com

101–102 of 102 posts

Re: C++ in the Linux Kernel

#101
post #88

Earlier quoted context omitted.

C++ or even C isn't exactly "fine" on any 8-bit system though. It's nice for a little demo, it can even be tolerable for some real-world projects when mixed with large amounts of inline assembly, but those 8-bit ISAs have been designed mainly for manual assembly coding, not high level compiled languages like C.

C translates directly to ASM in many cases. It just makes managing offsets and other stuff easier. C++ adds type-safety on top of that for no cost. It's great when your compiler tells you that there is no operator =|(PORTD, PINA). Did you mean |=(PORTD,PIND) or =|(PORTA,PINA).

> C translates directly to ASM in many cases.

But usually much worse ASM than what a human would write on such CPUs, because the C compiler is still restricted by artificial high-level concepts like calling conventions, and it needs to wrestle with instruction sets that are not very compiler-friendly and tiny non-orthogonal register sets. C++ just adds a whole level of code obfuscation on top, so it's harder to tweak what code the compiler actually generates.

Re: C++ in the Linux Kernel

#102

Earlier quoted context omitted.

Only when used with non-gradable adjectives/adverbs (from the same surce: https://dictionary.cambridge.org/grammar/british-grammar/qui... ) (and yes, uniform, is quite non-gradable) (non-native speaker here, quite frustrated about the quite different meanings of 'quite')

'Quite dead' for example means completely dead.

Only because dead is so binary. Any moderately intense modifier on "dead" signifies complete death, even though it won't mean 'completely' with most terms.
Post reply on HN