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

Jin Xu edited comment on LANG-1601 at 8/25/20, 10:21 AM:
---------------------------------------------------------

[~erans]
Hi.

??Isn't this class the typical example of why code duplication is to be 
avoided???

Agreed.

??My remark aimed at deprecating/removing the code in [Lang] after ensuring 
that the functionality is correctly implemented in [Numbers].??

Agreed, but we'd better discuss about this with gary.

??The differences which you note are implementation details: They don't pertain 
to the concept of fraction; so a user of [Lang]'s implementation should be able 
to switch to [Numbers]'s implementation without loosing any important 
functionality.??

Well, not quite.
They have a very strict test for each of the points I pointed out...
So if we want to change Fraction.pow in commons-lang's sources to versions in 
commons-numbers, tests about those features will fail.
But yes, the main ideas/logics be same, and I don't think any human user will 
have trouble in switching to numbers.


was (Author: xenoamess):
[~erans]
Hi.

??Isn't this class the typical example of why code duplication is to be 
avoided???

Agreed.

??My remark aimed at deprecating/removing the code in [Lang] after ensuring 
that the functionality is correctly implemented in [Numbers].??

Agreed, but we'd better discuss about this with gary.

??The differences which you note are implementation details: They don't pertain 
to the concept of fraction; so a user of [Lang]'s implementation should be able 
to switch to [Numbers]'s implementation without loosing any important 
functionality.??

Well, not quite.
They have a test for each of the points I pointed out...
So if we want to change Fractionpow in commons-lang's sources to versions in 
commons-numbers, tests about those features will fail.
But yes, the main ideas/logics be same, and I don't think any human user will 
have trouble in switching to numbers.

> refine performance of Fraction.pow
> ----------------------------------
>
>                 Key: LANG-1601
>                 URL: https://issues.apache.org/jira/browse/LANG-1601
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.math.*
>            Reporter: Jin Xu
>            Priority: Minor
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> https://github.com/apache/commons-lang/pull/611



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to