3 ms·
> and trust me, it ends up as a disaster. [...] please do not do this in any project... for the sake of any who will follow you in maintaining your code! The L
by jasode 11y ago
> and trust me, it ends up as a disaster. [...]
please do not do this in any project... for the sake of any who will follow you in maintaining your code!
The Linux kernel has some OO techniques in C. 2-part story:
https://lwn.net/Articles/444910/ https://lwn.net/Articles/444910/
https://lwn.net/Articles/446317/ https://lwn.net/Articles/446317/
I don't follow the Linux development mailing lists so I don't know if Linus Torvalds and other respected contributors regard those techniques as "disasters". Maybe they do.
- Skunkleton 11y agoI would argue that the linux kernel is largely object oriented, especially in the realm of device drivers. Every subsystem that I have worked with has you fill out the equivalent of a vtable, and passes state through structs rather than globally.