2009/3/2 Peter Miller <pmil...@opensource.org.au>: > Hi Folks, > > libexplain 0.9 is out. I would apprciate it if some of you cold try it > out, and let me know what you think. > > One of the things about the library is that all exported symbols start > with "libexplain_" (linker name space cleanliness) but this doesn't > necessarily convey the meaning well. > > E.g. libexplain_open is a replacement for strerror after open calls. It > has been suggested that "explain_open" may be a better choice. Or maybe > strerror_open would have been a better name? (maybe the library should > have been called "strerror"?) > > The other naming knob to twiddle is libexplain_open_or_die that wraps > open and libexplain_open in a single function (and calls > exit(EXIT_FAILURE) for errors). Calling this "open_or_die" would break > the name space cleanliness rule, but the namespace cleanliness would > seems to obfuscate the purpose in this case. Suggestions?
If this is a common pattern maybe you should have a shorter convention like explain_open_x or explain_must_open. It might be nice if this was hooked into talloc's C unwinding mechanism so that there was a chance to do some cleanup if it failed... -- Martin <http://launchpad.net/~mbp/> _______________________________________________ coders mailing list coders@slug.org.au http://lists.slug.org.au/listinfo/coders