Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CF: RE: CF 0.96.*
- To: "'crossfire (at) ifi.uio.no '" <crossfire (at) ifi.uio.no>
- Subject: CF: RE: CF 0.96.*
- From: dragonm <>
- Date: Fri, 3 Sep 1999 12:05:37 -0700
- Sender:
-----Original Message-----
From: Mark Wedel
To:
Sent: 9/2/99 8:41 PM
Subject: Re: CF 0.96.* (Was: Re: CF: corpses and Animate Dead spells)
<snip>
>
> Hmmm, I don't suppose we plan to migrate to C++, but this sure does
sound like
> OOP. :-)
This is an interesting question. I had thought about some things, and
using
C++ would be easier in that regards.
IF (and that is a big IF) we want to go to C++, now is probably the
time to do
it. It would certainly make some code cleaner. And the amount of work
may not
be as great as one might think - ANSI C code (which crossfire is) for
the most
part compiles under C++. So while some areas may not be in the OOP
model (like
maps and treasures), the code could remain as is (ANSI C) and still get
compiled
in and work OK.
Thoughts?
------------------
If now is the time to consider moving to C++, now is also the time to stomp
on the idea. Hard. I've no objection to C++ per se. What I object to is
the ineptitude of the majority of C++ programmers. If we can avoid being
sucked into a morass of multiple inheritance and degenerate classes, I'm all
in favor of sticking with C. I am reminded of a quote by the designer and
coauthor of the C++ Standard Template Library (as quoted in Edizioni
Infomedia srl):
"For example, I spent years trying to find some use for inheritance and
virtuals [in C++], before I understood why that mechanism was fundamentally
flawed and should not be used."
-Alexander Stepanov, 1996
My formal education emphasized inheritance with a vengeance, and I hated it
with a passion. As you can imagine, I felt much vindicated when I
discovered that the mind that produced the STL held a similar opinion.
Stepanov talks out of both sides of his mouth, since he also recommends
"Design Patterns" by Gamma, et al., which uses inheritence extensively. But
his point is well taken. It is far FAR too easy to wander down the rosy
path of Object Oriented design and programming, only to find oneself snarled
in the thorns. Better to stick with what we have. After all, there's no
prohibition against object oriented design inherent in C.
DM
-
[you can put yourself on the announcement list only or unsubscribe altogether
by sending an email stating your wishes to ]