: The template trick would do what I want quite conveniently, but I'm not : sure if I want to use templates.
Once again... forgive my ion code ignorance... i don't have nearly the context that you do. Consider whether or not to use templates very carefully. They can make life extremely easy. Not only that, they can make your code a lot faster than using RTTI needlessly. They can also help reduce the amount of object copying that goes on. Using the MOJO pattern you can do great things with templates (see http://www.cuj.com/experts/2102/alexandr.htm) to stop doing copies and do more "moves" instead. I agree that Java forcing objects on you is a MAJOR pain in the ass, which is one of many reasons why C++ is the better choice. That's why you should be using function objects, template functions, namespaces, functions, or whatever to augment your classes. The STL makes a lot of use of these types of things with generic algorithms and functions (like sort, reverse, find, etc...). As for the exception stuff. You'll never find code that uses exceptions exclusively. Hell, if you make one system call you're not using exceptions exclusively. Using either exceptions or no-exceptions exclusively is probably not best. It's usually best to use each for its strengths. Basically put, just because something fails doesn't mean you want to pop down to a catch block. In those cases (and there are many) you wouldn't throw an exception. It's not an all-or-nothing proposition. Regs, Derek -- ----------------------------------------------------------- Derek Quinn Wyatt | Phone: (905) 886-7818 ext. 2313 Syndesis Engineering | Fax: (905) 886-9076 Toronto, Ontario, CAN | Email: [EMAIL PROTECTED] ----------------------------------------------------------- "He was as lame as a duck. Not the metaphorical lame duck either, but a real duck that was actually lame. Maybe from stepping on a land mine or something."
