Re: [gtk-list] Re: ANNOUNCE: Experimental C++ Wrapper



Howdy all,
Just thought I would throw in my $0.02 worth. I love C++, its just C++
programmers that I can't stand ;o). I have been on projects that have
gone way out of control in a helluva hurry because of the abuse of C++.
Those projects failed miserably. As a result of those failures and my
desire to use C++ on Gtk related projects I have created the following
policies for myself and others working on my projects. Enjoy!

I think I will duck back in my bunker for safety.

	-Dean Johnson

------------------------------------------------------------------------


Use a fairly strict subset of C++ for clarity
and support issues. The coding style is more like C with some good and
non-arcane features in C++. This is to placate the anti-C++ forces that
swirl around in the vortex known at GNOME, whose complaints about lack
of maintainability of C++ code are quite well informed and hardened by
experience.

THOU SHALT NOT USE...

        * Templates. They are evil and not well supported on many
          debuggers.

        * Exceptions. These are rarely supported well in any debugger.
          They are also a crutch for poor design and destroy the clean
          lines through the codes.

        * Overloaded operators. This creates code that is incredibly
          hard to read

Thou shalt...

        * Have a destructor for every constructor that does an
allocation.

        * Use polymorphisms for clarity and elegance.

        * Use default arguments to reduce typing.


                ------------------------------------------------
                NOTE:   Any "THOU SHALT NOT"'s detected will be
                        summarily removed without warning.
                ------------------------------------------------



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]