From: Jessie Hernandez (jessie_at_[hidden])
Date: 2003-10-30 18:08:50
"Peter Dimov" <pdimov_at_[hidden]> wrote in message
> Jessie Hernandez wrote:
> > For these reasons, I think providing a minimal number of exception
> > classes is the middle-ground. I don't consider it a "virtue", but I
> > think this change will please most users.
> In other words, you will deliberately make your design worse because this
> "will please most users" (an unproven assertion).
> If you have many exception classes, people that don't feel comfortable
> them (assuming that there are such people; it is somewhat insulting to
> of your users as so deficient) can still use the appropriate intermediate
> exception classes exactly as if these classes were the only exceptions
I don't see reducing the amount of exception classes as "making the design
worse". Also, my comments were not meant to be insulting to anyone (forgive
me if they could have been interpreted this way). On the contrary, all I
want to do is gather opinions from everyone to see where I should put future
efforts in the library.
Consider the string_algo review that's currently going on: there has been
much debate on what to name the in-place and copy versions of the
algorithms. IIRC, there were several proposals, such as "trim(str)",
"s2=trim_copy(s1)", "trim(inplace(str))", "s2=trimmed(s1)", etc. The author
of the library might prefer having "trim" and "trim_copy", e.g., but what if
the majority of users want to have "trim" and "trimmed"? Then it will have
these names, though the author might not specifically agree with them.
I am trying to do the same with the sockets library. If the majority want
less exception classes, then I will reduce it. If they want more, then I'll
add more. My opinion on this matter may not be the same as the majority's
opinion, but the fact remains that the opinion of the majority is what
counts, and I don't mind making these types of changes.
Also, FWIW, Java's java.net package only has 11 exception classes, and most
of these are "generic" (such as BindException and ConnectException).
-- Jessie Hernandez
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk