To C++ or not to C++

From: Ryan Sommers (ryans_at_gamersimpact.com)
Date: 06/24/05

  • Next message: Erich Dollansky: "Re: To C++ or not to C++"
    Date: Fri, 24 Jun 2005 08:34:13 -0600 (MDT)
    To: hackers@freebsd.org
    
    

    Greetings all... I'm about to undertake a major software engineering
    project and I can't decide between C or C++ and was wondering if I could
    get some input from the community.

    As part of this project I'm going to need to make use of at least 2 C
    libraries (OpenSSL and ncurses) and the application must be compatible
    with the standard range of Linux/UNIX compilers and operating systems. All
    of these signs make me sway closer to just doing it in C. However, one
    strong point always seems to pull me back to C++, constructors and
    destructors.

    Constructors and destructors can offer so much in the way of memory leak
    avoidance. Of course, each language can leak memory like a sieve if used
    improperly. However, for statically allocated structures semi-automatic
    garbage collection can be a nice cushion.

    Anyway, without getting into too much detail. Anyone had to make this
    choice on a project? What were your thoughts in retrospect? What would you
    have done different, what would stay the same...

    PS For this project things like polymorphisms and inheritance really
    aren't needed.

    Thanks

    -- 
    Ryan Sommers
    ryans@gamersimpact.com
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: Erich Dollansky: "Re: To C++ or not to C++"

    Relevant Pages

    • Re: advantages of C
      ... And constructors and destructors and templates and exceptions and ...
      (comp.programming)
    • Re: advantages of C
      ... And constructors and destructors and templates and exceptions and ... inheritance and virtual functions and the STL and operator overloading ... cast to void* instead of writing template classes. ...
      (comp.programming)
    • Re: On assembly and portability (between Linux and Windows)
      ... >>any requirement to automatically call constructors and destructors. ... In order to be considered truely object oriented, a programming language ... and structure in an object-oriented computer program. ... I see no reason to require Constructors or Destructors. ...
      (alt.lang.asm)
    • Re: C++ Runtime Binding
      ... I believe you are under the misconception that constructors and ... destructors only, since these are the only ones affected in ATL3. ... > "Igor Tandetnik" wrote in message ... >>> called without the CRT? ...
      (microsoft.public.vc.atl)
    • Re: Operator overloading in C
      ... This means that the need of constructors or destructors ... gamut of applications is very effective in a cost/usge relationship. ...
      (comp.std.c)