Object-Oriented Programming With C

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tassos Souris
    New Member
    • Aug 2008
    • 152

    Object-Oriented Programming With C

    Hello to everybody!

    The purpose of this thread is to look at your opinions about the different techniques developed that aim at object-oriented programming with the C Programming Language.

    I want your opinions and your suggestions (personal experience) about which one is the best, if it worths (or is just to follow the trend) and other links.

    I am currently using the techniques developed by Axel-Tobias Schreiner (which were used by the Plan 9 project) and i found them very very good and easy to use.
    On the other side, the GObject system is not so robust in my opinion and hard to use.
    If you have another "API" that you find better please let me know!

    Please tell me your experience (or personal opinion) about this subject. I would appreciate it.

    Thanks for your time!
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Hi,

    you might have a look at "Objective C"; it is a little known language outside the Apple world but I find it quite an elegant language. If you really look you can see a couple of Java ideas shining through (but Objective C was first ;-) There's a GNU port of the NextStep library/runtime system, named GNUStep.

    kind regards,

    Jos

    ps. Google gets you started.

    Comment

    • Tassos Souris
      New Member
      • Aug 2008
      • 152

      #3
      I am aware of the Objective C language...
      my purpose is not to learn another OO language that is similar with C but to use C for that purpose (in pure standard format)...

      From what i searched in google there are the techniques i mentioned in the first post and some excellent articles in the Sun Microsystems site (which unfortunately do not form a consinstent style).

      I just want the experience from those who have tried such techniques to hear some opinions about their usage cause i cannot find anywhere in the net a similar topic (for a subject that has over 16863 projects in SourceForge, implemented by the GNOME project and so many articles)!
      I just cannot find any real experience in the internet.. that's basically what i am looking for.. :-) I
      I guess that i will find out my self after years of using such techniques :-) -:) :-)

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by Tassos Souris
        I am aware of the Objective C language...
        my purpose is not to learn another OO language that is similar with C but to use C for that purpose (in pure standard format)...

        From what i searched in google there are the techniques i mentioned in the first post and some excellent articles in the Sun Microsystems site (which unfortunately do not form a consinstent style).

        I just want the experience from those who have tried such techniques to hear some opinions about their usage cause i cannot find anywhere in the net a similar topic (for a subject that has over 16863 projects in SourceForge, implemented by the GNOME project and so many articles)!
        I just cannot find any real experience in the internet.. that's basically what i am looking for.. :-) I
        I guess that i will find out my self after years of using such techniques :-) -:) :-)
        I've been there, done that: if you don't want to use language constructs beyond the C language you're bound to horrible preprocessor constructs and a lot of artifacts you have to type and you don't want to type.

        A runtime support library just isn't enough; just look at C++: it started off as a translator from C++ to C; Objective C started off as a separate preprocessor for C and both ended up being separate parsers and code generators; C++ wants to look like C, that's all (and it fails in certain areas as you might've noticed).

        If you start off from another 'paradigm' you can get a lot of the OO paradigm for free; e.g. if you have a functional language you have closures and you almost have classes and inheritance for free. All the private/protected hulla baloo is a matter of a language sauce on top of that. There is no magic in OOP but some language constructs come in quite convenient, a convenience pure C can't offer you.

        kind regards,

        Jos

        Comment

        Working...