Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object Oriented Programming in C

 
Duggs Dojo
Greenhorn
Posts: 4
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6323
78
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6323
78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 50211
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are ways you can mimic OO in C, but it produces some awkward syntax.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic