
From: "Peter Dimov" <pdimov@mmltd.net>
Beman Dawes wrote:
"Peter Dimov" <pdimov@mmltd.net> wrote in message news:005701c55008$0eacc010$6401a8c0@pdimov2...
Rob Stewart wrote:
I don't like the status()/symlink_status() split. How about overloading like this:
struct follow_symlink_t { }; extern const follow_symlink_t follow_symlink;
status_flags status(path const &); status_flags status(path const &, follow_symlink_t);
FWIW, I'm in favor of the current design.
Rationale?
I don't view overloading for overloading's sake as improvement; there's nothing wrong with giving different names to different behaviors.
These functions do very nearly the same thing. That seems an ideal case for overloading.
The practice of overloading on behavior seems inspired by new(nothrow), but in that case we simply don't have the option of providing a differently-named function.
You say that as if new(nothrow) was a poor source of inspiration. I thought it was just the thing.
One practical argument for not introducing overloading is that it's harder to use boost::bind on an overloaded function.
Is that a significant issue for this pair of functions? -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;