commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [math] Add FieldElement.divide(int) ?
Date Mon, 05 Mar 2012 14:50:41 GMT
On 5 March 2012 12:45, Gilles Sadowski <gilles@harfang.homelinux.org> wrote:
> On Mon, Mar 05, 2012 at 01:17:18PM +0100, Sébastien Brisard wrote:
>> 2012/3/5 sebb <sebbaz@gmail.com>:
>> > 2012/3/5 Sébastien Brisard <sebastien.brisard@m4x.org>:
>> >> Le 5 mars 2012 09:57, Sébastien Brisard <sebastien.brisard@m4x.org>
a écrit :
>> >>> Hi,
>> >>> I would like to make the following addition to the FieldElement<T>
interface:
>> >>> T divide(int n)
>> >>> which would formally be defined as
>> >>> this.divide(n) = this.divide(this.getOne().multiply(n)).
>> >>>
>> >>> This would simplify some expressions, eg integration of polynomials
(a
>> >>> * x**k becomes a / (k+1) * x ** (k+1)).
>> >>>
>> >>> What do you think?
>> >>> Sébastien
>> >>
>> >> Please note that the change would hardly be noticeable, as many of the
>> >> classes implementing FieldElement already implement divide(int).
>> >> Sébastien
>> >
>> > Also, adding a method to an interface is binary compatible.
>> > It is not source compatible.
>> >
>> > Sebastian
>> >
>> Ooops.
>> That's true. I guess I'll have to postpone this one until 4.0... Sorry
>> about that...
>> Let me rephrase that: would you *in principle* agree with this new
>> feature? If that's OK, I could file a (very long term) JIRA ticket (to
>> be fixed in 4.0).
>
> It's nowhere written that major releases should be few and far between.

It's binary compatibility that is vital.

Breaking source compatibility is not generally as disruptive, and has
been done before now in minor releases (obviously should not be done
in a point release).

However, if the required source changes are very extensive, it might
warrant a major release.
In this case, it's unlikely to require many (if any) changes to source code.

If the test code needs changing as a result of changing the interface,
that should give a clue (assuming proper coverage).

>
> Gilles
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

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


Mime
View raw message