commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: StopWatch stop
Date Wed, 03 May 2017 14:52:52 GMT
I suppose another approach is to punt any kind of fluent redo to 4.0, and
break BC at that point, avoiding class duplication.

Gary


On May 3, 2017 4:10 AM, "Benedikt Ritter" <britter@apache.org> wrote:


> Am 02.05.2017 um 04:36 schrieb Matt Sicker <boards@gmail.com>:
>
> What about a fluent package for classes like this so you can still call it
> StopWatch?

As I’ve argued for the concurrency annotations, I don’t think it’s good
style to package stuff by their technical similarities. So I’d add those
fluent classes along side their classical counterparts.

Further more we had the request to add FluentStringUtils which was a
version of StringUtils with a fluent API. We rejected the request arguing
that while this could be implemented we don’t see this as part of Commons
Lang. Maybe we need to revisit that decision in the light of the current
discussion.

Benedikt

>
> On 1 May 2017 at 21:02, Gary Gregory <garydgregory@gmail.com> wrote:
>
>> I am down to copying StopWatch as FluentStopWatch and adding "return
this;"
>> to all the void methods.
>>
>> I can so that in my code base but does it induce vomiting if Commons Lang
>> has both StopWatch AND FluentStopWatch?
>>
>> Gary
>>
>> On Sun, Apr 30, 2017 at 2:47 PM, Gary Gregory <garydgregory@gmail.com>
>> wrote:
>>
>>> Sorry, Commons Lang.
>>>
>>> Gary
>>>
>>> On Apr 30, 2017 1:47 PM, "Matt Sicker" <boards@gmail.com> wrote:
>>>
>>>> Which subproject are you speaking of anyways?
>>>>
>>>> On 30 April 2017 at 15:46, Gary Gregory <garydgregory@gmail.com> wrote:
>>>>
>>>>> A new method perhaps or a new class a la fluent?
>>>>>
>>>>> Gary
>>>>>
>>>>> On Apr 30, 2017 1:32 PM, "Matt Sicker" <boards@gmail.com> wrote:
>>>>>
>>>>>> Yup, here it is:
>>>>>> 13.4.15. Method Result Type
>>>>>>
>>>>>> Changing the result type of a method, or replacing a result type
>> with
>>>>> void,
>>>>>> or replacing void with a result type, has the combined effect of
>>>> deleting
>>>>>> the old method and adding a new method with the new result type or
>>>> newly
>>>>>> void result (see §13.4.12
>>>>>> <https://docs.oracle.com/javase/specs/jls/se7/html/jls-
>>>>> 13.html#jls-13.4.12
>>>>>>>
>>>>>> ).
>>>>>>
>>>>>> For purposes of binary compatibility, adding or removing a method
or
>>>>>> constructor m whose return type involves type variables (§4.4
>>>>>> <https://docs.oracle.com/javase/specs/jls/se7/html/jls-
>> 4.html#jls-4.4
>>>>> )
>>>>> or
>>>>>> parameterized types (§4.5
>>>>>> <https://docs.oracle.com/javase/specs/jls/se7/html/jls-
>> 4.html#jls-4.5
>>>>> )
>>>>> is
>>>>>> equivalent to the addition (respectively, removal) of the an
>> otherwise
>>>>>> equivalent method whose return type is the erasure (§4.6
>>>>>> <https://docs.oracle.com/javase/specs/jls/se7/html/jls-
>> 4.html#jls-4.6
>>>>> )
>>>>> of
>>>>>> the return type of m.
>>>>>>
>>>>>> On 30 April 2017 at 15:30, Matt Sicker <boards@gmail.com> wrote:
>>>>>>
>>>>>>> https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html
>>>>>>>
>>>>>>> A reference to a method must be resolved at compile time to a
>>>> symbolic
>>>>>>> reference to the erasure (§4.6
>>>>>>> <https://docs.oracle.com/javase/specs/jls/se7/html/jls-4.
>>>> html#jls-4.6
>>>>>> )
>>>>>>> of the qualifying type of the invocation, plus the erasure of
the
>>>>>> signature
>>>>>>> (§8.4.2
>>>>>>> <https://docs.oracle.com/javase/specs/jls/se7/html/jls-
>>>>> 8.html#jls-8.4.2
>>>>>>> )
>>>>>>> of the method.
>>>>>>>
>>>>>>> I'm getting the impression here that the ABI follows the same
>> rules
>>>> as
>>>>>>> using MethodHandle.invokeExact().
>>>>>>>
>>>>>>> On 30 April 2017 at 15:21, Gary Gregory <garydgregory@gmail.com>
>>>>> wrote:
>>>>>>>
>>>>>>>> On Apr 30, 2017 1:19 PM, "Oliver Heger" <
>>>> oliver.heger@oliver-heger.de
>>>>>>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> I think client code has to be recompiled, otherwise a
>>>>> NoSuchMethodError
>>>>>>>> is thrown.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Dang it. Are you sure?
>>>>>>>>
>>>>>>>> Gary
>>>>>>>>
>>>>>>>>
>>>>>>>> Oliver
>>>>>>>>
>>>>>>>> Am 30.04.2017 um 21:24 schrieb Matt Sicker:
>>>>>>>>> That sort of thing changes the binary signature, but
source
>>>>>>>> compatibility
>>>>>>>>> is retained.
>>>>>>>>>
>>>>>>>>> On 30 April 2017 at 14:20, Gary Gregory <
>> garydgregory@gmail.com>
>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> Would it break BC to change StopWatch.stop() to return
"this"?
>>>>>>>>>>
>>>>>>>>>> Gary
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>>>>>>>>>> Java Persistence with Hibernate, Second Edition
>>>>>>>>>> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>>>>>>>>>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>>>>>>>>>> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b
>>>>>>>> 1af9fe6a2b8>
>>>>>>>>>>
>>>>>>>>>> <http:////ir-na.amazon-adsystem.com/e/ir?t=
>>>>>> garygregory-20&l=am2&o=1&a=
>>>>>>>>>> 1617290459>
>>>>>>>>>> JUnit in Action, Second Edition
>>>>>>>>>> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>>>>>>>>>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>>>>>>>>>> linkCode=as2&tag=garygregory-20&linkId=
>>>>>> 31ecd1f6b6d1eaf8886ac902a24de4
>>>>>>>> 18%22
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> <http:////ir-na.amazon-adsystem.com/e/ir?t=
>>>>>> garygregory-20&l=am2&o=1&a=
>>>>>>>>>> 1935182021>
>>>>>>>>>> Spring Batch in Action
>>>>>>>>>> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>>>>>>>>>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>>>>>>>>>> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>>>>>>>>>> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>>>>>>>>>> <http:////ir-na.amazon-adsystem.com/e/ir?t=
>>>>>> garygregory-20&l=am2&o=1&a=
>>>>>>>>>> 1935182951>
>>>>>>>>>> Blog: http://garygregory.wordpress.com
>>>>>>>>>> Home: http://garygregory.com/
>>>>>>>>>> Tweet! http://twitter.com/GaryGregory
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------
>>>> ---------
>>>>>>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>>>>>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Matt Sicker <boards@gmail.com>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Matt Sicker <boards@gmail.com>
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Matt Sicker <boards@gmail.com>
>>>>
>>>
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition
>> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
>> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>>
>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1617290459>
>> JUnit in Action, Second Edition
>> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
>> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de4
18%22
>>>
>>
>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1935182021>
>> Spring Batch in Action
>> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
>> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
>> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
>> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
>> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
>> 1935182951>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>
>
>
> --
> Matt Sicker <boards@gmail.com>


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message