[ 
https://issues.apache.org/jira/browse/LANG-1387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16440767#comment-16440767
 ] 

Gilles commented on LANG-1387:
------------------------------

{quote}Is there an eclipse format configuration file so that all the spaces 
bracesetc are correct?
{quote}
I don't know; it is perhaps a good suggestion for the "dev" ML.
 Otherwise, such issues are reported by "CheckStyle" (locally when you run "mvn 
site") and maybe by the Travis run.
{quote}There is no reasons that other implementations could not exist.
{quote}
How would another implementation behave differently while still abiding by the 
contract?
{quote}What is the recommended separation for the common packages?
{quote}
There is no common convention; each component has its own habits, I think.
 IMHO, the straightforward design is a class containing factory method(s). See 
e.g. the discussion about Complex.
{quote}If this was Java 8 I might put those in as default calculations. 
However, calcEnd() and calcLength() are provided so that spans that implement 
based on the end or length can easily and correctly calculate the other.
{quote}
I see this as further support that alternative implementations are unlikely.
 Having a single class implement the requested functionality solves the issue 
of splitting "base" and "utility" methods.

As a side point, if the "span" tools where defined in their own module, it 
could target Java 8.
{quote}On the underflow/overflow issues. Is there any reason not to use 
components from other commons packages?
{quote}
Not a priori. However, historically, it has been preferred to copy code rather 
than have dependencies.
 The current development version of "Commons Math" depends on modules in 
"Commons Numbers".
{quote}Are there packages that are offlimits due to possible circular 
dependencies?
{quote}
The issue hasn't occurred yet (AFAIK). IMO, it would indicate a design problem.
{quote}FastMath component in math3 would be useful for the 
underflow/overflowchecking.
{quote}
Any low-level, self-contained, code in "Commons Math" is a candidate for being 
moved to ["Commons 
Numbers"|https://git1-us-west.apache.org/repos/asf?p=commons-numbers.git;a=tree].

We should continue this conversation on the "dev" ML. ;)

> Add Span interfaces to handle checks for overlaps, containment, equality, etc.
> ------------------------------------------------------------------------------
>
>                 Key: LANG-1387
>                 URL: https://issues.apache.org/jira/browse/LANG-1387
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*, lang.math.*
>    Affects Versions: 3.7
>            Reporter: Claude Warren
>            Priority: Minor
>
> This is a contribution of a span class as discussed on the mailing list.
> The classes are int and long based and can:
>  # determine if points are within the span.
>  # determine if one span contains another span
>  # determine if two spans overlap
>  # do not have to have 0 (zero) as the index origin.
>  # determine the length of the span
>  # determine the last position in the span.
>  # determine the first position in the span.
> Changes to Number Utils required to detect underflow and overflow 
> calculations.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to