[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

9566: [MUD-Dev] Re: Question on c++ switch optimization, and parsers i

[Full Header] [Plain Text]
From: Chris Gray <cg@ami-cg.GraySage.Edmonton.AB.CA>
Newsgroups: nu.kanga.list.mud-dev
Date: Mon, 8 Feb 1999 20:44:20 -0700
Organization: Kanga.Nu
[Ben Greear:]

 >> Instead of the array mapping to enums, why not map to funtion pointers?
 >
 >Cause all my methods have different signatures..

This is one of the few cases where I feel justified in using type-cheating
casts. The intent is clear, and it saves a whole lot of rigamarole. I
presume you can still do that in C++.

--
Don't design inefficiency in - it'll happen in the implementation. - me

Chris Gray     cg@ami-cg.GraySage.Edmonton.AB.CA
               http://www.GraySage.Edmonton.AB.CA/cg/