aspose file tools*
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
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: 3

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: 3647
    
  16

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.
Duggs Dojo
Greenhorn

Joined: Dec 18, 2013
Posts: 3

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: 3647
    
  16

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: 38902
    
  23
There are ways you can mimic OO in C, but it produces some awkward syntax.
 
Don't get me started about those stupid light bulbs.
 
subject: Object Oriented Programming in C