On Tue, 29 Nov 2016 18:44:34 -0800, Gary Gregory wrote:
On Tue, Nov 29, 2016 at 5:19 AM, Eric Barnhill <ericbarnh...@gmail.com>
wrote:

I thought it would be good to raise a structural question here rather than
in the commons-complex JIRA.

The Complex library has multiple dependencies on three packages:

-- commons-math base classes (e.g. Field et al.)

-- commons-math exceptions


I have never been a fan of packages that include all exceptions. It does
not make sense to me. If an exception is only used in package foo, it
should be defined in that package.

If it is used in foo.one and foo.bar, maybe it belongs in foo. YMMV. But kitchen-sink package for all exceptions does not seem like good design to
me.

This kind of hand-waving argument serves little.
[And I'm not saying now that Commons Math's design was good or bad
in that area.]
But did you look at the subject of discussion, i.e. the package in
question and by which packages some of those exception are used?

If one considers an "error" type as a concept, then the _same_ "error"
can appear in multiple places, so this is an argument for having them
stand alone in their own package, rather than having multiple copies,
or have everything in the top-level package.[1]

But I agree that with a true "component"[2], it is probably not worth
to not having a specific "exception" package (namely because the number
of exceptions is likely to be very limited).
[I think that, on that matter, my answer to Eric was clear and in line
with your statement.]


Regards,
Gilles

[1] Which I consider bad design, for reasons not worth mentioning
    because I know (from experience, now) that this discussion
    will lead to nowhere.
[2] I.e. not with kitchen sinks that [Math] or [Lang] are now.


2c,
Gary


[...]


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to