Find the answer to your Linux question:
Results 1 to 6 of 6
hi,, why most of toolkits that used to create GUI either in Linux or other OSs use C++ not C?? in other words O-O languages not C? thanks...
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Posts
    29

    why C++ in GUI tool?

    hi,,
    why most of toolkits that used to create GUI either in Linux or other OSs use C++ not C??
    in other words O-O languages not C?
    thanks

  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    Try GTK+ for windows and Linux/Unix

  3. #3
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Most GUI aspects map very well to object orientated design.
    (An 'OK' button is a button which is a window which is a widget which is a message recipient which ... )

    That said, I am of the opinion that the number of C bindings to GUI toolkits is actually still bigger than the pure C++ ones.

  4. #4
    Just Joined!
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    13
    If you really want low level, why not try RealBasic.

    VB styled programming compiled directly to ASM for Linux, Unix, Win and Mac platforms

  5. #5
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Quote Originally Posted by raedbenz View Post
    hi,,
    why most of toolkits that used to create GUI either in Linux or other OSs use C++ not C??
    in other words O-O languages not C?
    thanks
    There are lots of toolkits based on procedural languages like C, I wouldn't dare to say what model (procedural or OO) has the biggest code base in which regards GUIs (I really haven't the slightest idea).

    However, as someone above said, the OO model fits perfectly the design of interfaces. I suppose it's all about tastes, each one has his/her own mental model and so "the natural thing" is different for different persons.

  6. #6
    Linux Enthusiast apoorv_khurasia's Avatar
    Join Date
    Feb 2005
    Location
    Laurasia
    Posts
    624
    In fact it is not only applicable to GUIs but to quite a lot of different areas (server side, embedded etc.) as well --the trend is simple, people prefer OO over procedural and managed over unmanaged.

    The only places where one finds C now-a-days is where performance is really critical (and even in some of such cases C++ is not a bad option) or the code itself does not call for an OO design. Examples of such cases will be device drivers, low level kernel code etc.

    In the server world (Linux/Windows) Java is the enterprise standard (even if the code has all to do with number crunching -in which cases some people natively compile the code) while in the Windows GUI world C#/VB .Net is replacing the older Win32 API.

    Of couse exceptions exist and sometimes for good reasons.
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...