|
Boost : |
From: Rob Stewart (stewart_at_[hidden])
Date: 2005-05-04 09:38:55
From: "Peter Dimov" <pdimov_at_[hidden]>
> Beman Dawes wrote:
> > "Peter Dimov" <pdimov_at_[hidden]> wrote in message
> > news:005701c55008$0eacc010$6401a8c0_at_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_at_[hidden] Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk