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

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



On 8/30/2013 1:53 AM, Zenaan Harkness wrote:

As I said - you can emulate Object Based programming in C, although it
is messy.  You cannot create Object Oriented programs in C.

Are you saying you can NOT emulate inheritance in C?

Are you saying you can NOT emulate polymorphism in C?

Again, albeit with clunkyness, syntactic ugliness,
non-compiler-enforcement but only "policy" enforcement of visibility
constraints etc etc?

So again, are you saying that you are not merely splitting hairs over
terminology here?

If so, can you please explain why not, in terms that a non-C
programmer can understand?

Thank you
Zenaan



No, I am not splitting hairs. There is a difference between Object Based Programming, which supports encapsulation and message passing, and Object Oriented Programming, which also supports Inheritance and Polymorphism.

You can emulate OBP in C, although it's not very pretty or very nice (and quite prone to bugs). But you cannot do Inheritance or Polymorphism in C. The tools just aren't there.

Jerry


Reply to: