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?
[ Parent
| on HN ]
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.
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
Why would you want that?
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: