[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What's the easiest and/or simplest part of Linux Kernel?



(I really don't have time to do this.)

On Thu, Aug 29, 2013 at 12:17 PM,
> [Somebody replied to somebody, arguing that C can't do objects.]

The syntax does become obtuse, unfun, cluttered, etc., but it can be done.

(To get the neurons connecting, think about early objective-C, when
the "object" stuff was done with a special purpose pre-processor.

Shoot. Don't forget that C++ itself was once a pre-processor for C.)

Admittedly, the "object" syntax becomes a separate syntax and language
from the C part when you do OOP in unadorned C. You have to leave the
basic operators (+-*/%, etc.) out of the object-oriented language and
syntax. (Which is part of the reason it becomes unfun.)

You have to use #include skillfully, and you have to explicitly put
function pointers in structures. It kind of turns things upside down,
a bit, and a little inside-out. It'll make even seasoned C programmers
seasick. And the syntax is not as flexible as C++.

Which is all why C++ was written as a separate language.

But it can be done.

By the way, mathematically speaking, objects are machines.

None of which has anything to do with the simplest part of the Linux
kernel for a newbie to try to drown in.

--
Joel Rees


Reply to: