At Friday 2005-01-21 15:13, you wrote:
Mauricio Gomes wrote:
I would create a class (File or other name) that close() on its destructor.
I do not like this solution, but not because it doesn't work. It works just fine, and probably better than the more complicated alternatives that I have been thinking of.
The trouble is that its 'difficult.' Writing a class to do this takes a small but significant amount of effort. Maintaining code with this class be be slightly but significantly more difficult.
In particular, in code specific to a particular problem domain (as opposed to in general-purpose libraries), I don't like to see a whole lot of code that has nothing to do with that domain, or adds a whole lot of structure for very little expressive benefit. This sort of verbosity is a problem--I think--and a particular problem for C++. A significant criticism of C++ that I have heard is that the implementation of many sorts of code requires too structure, so that there is less actual expressive code than non-expressive code.
yeah? well how do you do this in any OTHER language? be _expressive_ please... enquiring minds want to know!
Aaron W. LaFramboise _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Victor A. Wagner Jr. http://rudbek.com The five most dangerous words in the English language: "There oughta be a law"