News for hackers. Stuff that matters.
Re:C, The Beautiful Language by starpilot on Tuesday March 15, 2011 @12:05AM (#2325865)
Stupid question: what do you do when you're working in C and want OOP?
Re:C, The Beautiful Language by burgerbrain on Tuesday March 15, 2011 @12:38AM (#2325984)
Use OOP. :)

But seriously, you don't need a language to smack you in the face with OOP syntax to use OOP, and with anything in programming, if you try to do it just like you do in other languages, you're going to be disappointed.

Re:C, The Beautiful Language by bergie on Tuesday March 15, 2011 @02:47AM (#2326347)
We use GObjects for that: http://library.gnome.org/devel/gobject/stable/

Through GObject Introspection this also means we get automatic OOP bindings to a bunch of higher-level languages

Re:C, The Beautiful Language by eru on Tuesday March 15, 2011 @08:10AM (#2327070)
Why would you want that?
Re:C, The Beautiful Language by derleth on Tuesday March 15, 2011 @02:58AM (#2326385)
http://www.bolthole.com/OO-C-programming.html

That's a simple intro to doing OO in C, mainly by becoming a human compiler that goes from whatever OO language you really want to C.

Note well that OO isn't a well-defined concept. Look at this list of features and ask yourself which of them you think of as being OO:

http://www.paulgraham.com/reesoo.html

Re:C, The Beautiful Language by jpr on Tuesday March 15, 2011 @02:21AM (#2326284)
Depends on what you mean by OOP. But function pointers (mostly in structs) are one way to do it.