Re: C++

From: Daniel Koepke (dkoepke@CALIFORNIA.COM)
Date: 03/08/98


On Mon, 8 Mar 1993, Judson Powers wrote:

->There's a lot more potential, in that if you convert to classes, you can
->use accessor functions, such as name() to get mName value.  This lets a
->class apply modifiers without too much code.  For example, if "Xane" is
->polymorphed into "a dragon", mName could store "Xane" like it normally
->would, mPolyData.mName would store "a dragon" and name() would return "a
->dragon" instead of "Xane" because Xane is polymorphed... get it?  Lots of
->potential... unfortunately, it requires a lot of rewriting.

More importantly, C++ has disadvantages as well.  Anyone who knows
both ANSI C and C++ (and it's increasingly possible to know one and
not know the other) can probably appreciate the simplicity and
cleanliness that ANSI C brings, even if it lacks 'new' and 'delete'.
And while there is certainly some code that could benefit from being
in C++, there is a lot that gets wrapped up in classes and red-tape
which shouldn't be.  Unless you're looking forward to a lot of
rewriting and a good dose of redesigning, I wouldn't do it.  As it
turns out, good C code and structures rarely make good C++ code and
classes.

->Be aware of all things;
->Endure all things;
->Be removed from all things.
->  -- 3 Druidic Virtues of Widsom

Where'd you pick that up?

"Warriors were dismayed/ At renewal of conflicts/ Such as Gwydion
 made. . . .The alders in the front line/ Began the affray/ Willow
 and rowan tree . . ."
   -- from the Cad Goddeu, The Book of Taliesin

-dak


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST