[geeks] C++ style
Joshua D Boyd
jdboyd at cs.millersville.edu
Thu Sep 19 10:06:06 CDT 2002
In my life, I want to benefit from "modern" classes to aid life, like
say dictionaries.
STL has many of these classes, but for various reasons, it isn't
practical for me to rely on them. The only thing I can safely rely on
is a set so small that they can easily fit on a floppy with lots of
space to spare, and additionally, work with, at a minimum VC++ and GCC.
So, having not found any that I like, I find myself writing my own
little classes, and constantly copying them and changing them for the
project at hand. Now, I want these to become more general, which brings
me to the question at hand.
Is it a good idea to write a an array class or dictionary class that
maintains an array or dictionary of void*s, or should I suck it up and
create my own base class system, or should I break down and use
templates (despite all the complaints I hear about them being slow, and
the fact that I'm working on code that needs to be vaguely performance
oriented).
I like the idea of using void*s, but when I was commenting on it to one
student, he said it sounded like a dirty hack. But, I'm not sure he
really sees the value in the idea of maintaining a stack of personal
classes for personal use.
Of course, the best solution would be to just use a different language
for everything, but that isn't really realistic with my current skill
set (or rather lack there of).
--
Joshua D. Boyd
More information about the geeks
mailing list