Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Object Oriented Programming in C  RSS feed

 
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
Saloon Keeper
Posts: 6980
110
  • 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
Saloon Keeper
Posts: 6980
110
  • 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
Posts: 53773
127
  • 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
Boost this thread!