On Sat, Mar 29, 2008 at 3:40 PM, Steven Watanabe <watanabesj@gmail.com> wrote:
AMDG
RTTI is not always evil. It may be less efficient to hash the strings,
Robert Dailey wrote:
> It seems that so far we've gotten everything done without RTTI, I
> would hate to introduce it here.
but it is not worse from a design perspective.
Yep. That works. Just thought I'd point out that this is not so very
> I see what you're saying now. Something like this might be in order:
>
> struct Packet
> {
> virtual PacketId GetId() const = 0;
> };
>
> struct WalkPacket : Packet
> {
> static const PacketId ID = PID_WALKPACKET;
> virtual PacketId GetId() const { return ID; }
> };
different
from RTTI, after all.
In Christ,
Steven Watanabe