my dog learned polymorphism
The moose likes C / C++ and the fly likes Object Oriented Programming in C Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Languages » C / C++
Bookmark "Object Oriented Programming in C" Watch "Object Oriented Programming in C" New topic
Author

Object Oriented Programming in C

Duggs Dojo
Greenhorn

Joined: Dec 18, 2013
Posts: 4

hello i just Learned some OOP in C language .I know GTK uses it.Is it better to program in C in object oriented paradigm than functional paradigm. i am interested in kernel programming ,is linux kernel in written in object oriented C .please clarify.
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 4087
    
  18

Did you mean procedural paradigm? As far as I know C and functional programming are polar opposites.

I believe the kernel is written mostly in C and assembly, so if kernel programming is what you want to do, you'll be stuck with those.


The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
Duggs Dojo
Greenhorn

Joined: Dec 18, 2013
Posts: 4

Stephan van Hulst wrote:Did you mean procedural paradigm? As far as I know C and functional programming are polar opposites.

I believe the kernel is written mostly in C and assembly, so if kernel programming is what you want to do, you'll be stuck with those.

yeah sorry i meant procedural programming . Do i need to learn OO paradigm for kernel programming thanks for the help BTW.
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 4087
    
  18

I don't think C really allows for much OO. I suggest you look at the Linux source to see how they've done it.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 44524
    
  34
There are ways you can mimic OO in C, but it produces some awkward syntax.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Object Oriented Programming in C
 
It's not a secret anymore!