Comment

Comment by jcelerier

Object-oriented design patterns in the kernel, part 1: https://lwn.net/Articles/444910/

I'd go as far as to say that every time you have a C API that looks like

    struct some_struct { ... };

    void my_api_foo(some_struct*, param1, param2);
    int my_api_bar(some_struct*);
    float my_api_baz(some_struct*, float**, int n);
it's OO. And the kernel is full of this (just like many C APIs).

Also, Linus's arguments are about C++ usage in kernel. His diving software Subsurface was ported from GTK / C to Qt / C++ for instance. (and even GTK with GObject* everywhere is fairly OO).

parent jcelerier 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton