Something is more maintainable if it is more understood. Exceptions are
meant for exceptional cases. At least that's a common conception, one which
I follow. Even thier name suggests their usage. Maintenance is a very good
reason to stay within expectations.
Staying within expectations may mean sacrificing performance. There is
often a trade-off between performance and maintainability. The pros and
cons should be weighed and a choice made.
Jeff
-----Original Message-----
From: Peter Dimov [mailto:pdimov@mmltd.net]
From: "Mark Storer"
Using exceptions in this way just bugs me. Religious reasons I guess. As the Esteemed Mr. Hylsop ;) mentioned earlier, exceptions are for "oops". This seems alot like the whole "do{}while(0)" with various 'break' statements sprinkled in to avoid multiple returns/nested ifs. Useful, but Just Not Right.
A common misconception. Many people try to project their own ideas/expectations on language features, rather than simply using them as tools where appropriate. There is nothing "oops"-y about exceptions. They are a control flow mechanism; one that has interesting properties, but a control flow mechanism nonetheless. If it works and leads to a better code, it's foolish to avoid it without a technical reason. A similar example is when people don't use "struct" for C++ classes because it "doesn't feel right", or when trying to choose between "typename" and "class" for template parameters. The language features simply do not carry this kind of religious/emotional payload. It's all in your mind. Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/