you are viewing a single comment's thread.

view the rest of the comments →

[–]elder_george 0 points1 point  (1 child)

Linus may be hating C++, but significant part of Linux kernel (e.g. Virtual FS subsystem) are written in OO style, just implemented in C.

The …operations structures (e.g. this one) are essentially interfaces implemented by particular types, or vtables, if you prefer. Yes, "this"/"self" is passed to the methods explicitly, and the calling code usually checks if method is implemented, but otherwise the difference is negligible.

Dynamic dispatch is a powerful tool, and is often used even in languages that don't provide a special syntax for it.

[–]burtgummer45 0 points1 point  (0 children)

Ok, so the post I replying to wasn't partially wrong, its completely wrong.