You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Pascal Schumacher <pa...@gmx.net> on 2018/11/24 11:58:01 UTC

Re: [Lang] CheckedFunction#unchecked

Hi Aleksander,

thanks.

Imho this would be a useful addition to commons-lang.

Any other opinions?

Cheers,
Pascal

Am 21.11.2018 um 22:52 schrieb Aleksander Ściborek:
> Hi
> I've just created pull request
> <https://github.com/apache/commons-lang/pull/385> for CheeckedFunction
> interface. This is an example of utils I would like to add in order to
> simplify usage of java Stream.
> Aleksander
>


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


Re: [Lang] CheckedFunction#unchecked

Posted by ajs6f <aj...@apache.org>.
Please do! This is a pretty common need and it would be nice to present a really well-designed set of types for it.

ajs6f

> On Nov 29, 2018, at 2:41 PM, Aleksander Ściborek <al...@gmail.com> wrote:
> 
> Ok, so I'm going to continue snd  in the near future I will create pull
> request with a lot of checked functions like Consumer, Predicate
> BinaryFuncton etc.
> 
> On Sat, Nov 24, 2018, 15:01 ajs6f <ajs6f@apache.org wrote:
> 
>> In that case you might want to also look at some other choices people have
>> made like
>> 
>> https://github.com/google/mug#maybe
>> 
>> or even more specialized facilities like
>> 
>> https://github.com/google/chkstream
>> 
>> I'm not against plain general functional types that handle checked
>> exceptions (I imagine most of us have written them for ourselves at some
>> point, which makes them a good candidate for Commons), but I've found that
>> generally I end up with clearer code if I can use an idiom more specific to
>> the task.
>> 
>> ajs6f
>> 
>>> On Nov 24, 2018, at 8:46 AM, Aleksander Ściborek <
>> aleksandersciborek@gmail.com> wrote:
>>> 
>>> Of course you are right. I'm going to add new functions. The idea behind
>>> this pull request is to show what I want to create, that's why I marked
>> PR
>>> as WIP (Work in Progress)
>>> 
>>> On Sat, Nov 24, 2018, 14:31 ajs6f <ajs6f@apache.org wrote:
>>> 
>>>> I would rather see a more complete offering with the other types in
>>>> j.u.function, i.e. Consumer, Supplier, Predicate, the various
>>>> primitive-specialized types...
>>>> 
>>>> ajs6f
>>>> 
>>>>> On Nov 24, 2018, at 6:58 AM, Pascal Schumacher <
>> pascalschumacher@gmx.net>
>>>> wrote:
>>>>> 
>>>>> Hi Aleksander,
>>>>> 
>>>>> thanks.
>>>>> 
>>>>> Imho this would be a useful addition to commons-lang.
>>>>> 
>>>>> Any other opinions?
>>>>> 
>>>>> Cheers,
>>>>> Pascal
>>>>> 
>>>>> Am 21.11.2018 um 22:52 schrieb Aleksander Ściborek:
>>>>>> Hi
>>>>>> I've just created pull request
>>>>>> <https://github.com/apache/commons-lang/pull/385> for
>> CheeckedFunction
>>>>>> interface. This is an example of utils I would like to add in order to
>>>>>> simplify usage of java Stream.
>>>>>> Aleksander
>>>>>> 
>>>>> 
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>> 
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> 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


Re: [Lang] CheckedFunction#unchecked

Posted by Aleksander Ściborek <al...@gmail.com>.
Ok, so I'm going to continue snd  in the near future I will create pull
request with a lot of checked functions like Consumer, Predicate
BinaryFuncton etc.

On Sat, Nov 24, 2018, 15:01 ajs6f <ajs6f@apache.org wrote:

> In that case you might want to also look at some other choices people have
> made like
>
> https://github.com/google/mug#maybe
>
> or even more specialized facilities like
>
> https://github.com/google/chkstream
>
> I'm not against plain general functional types that handle checked
> exceptions (I imagine most of us have written them for ourselves at some
> point, which makes them a good candidate for Commons), but I've found that
> generally I end up with clearer code if I can use an idiom more specific to
> the task.
>
> ajs6f
>
> > On Nov 24, 2018, at 8:46 AM, Aleksander Ściborek <
> aleksandersciborek@gmail.com> wrote:
> >
> > Of course you are right. I'm going to add new functions. The idea behind
> > this pull request is to show what I want to create, that's why I marked
> PR
> > as WIP (Work in Progress)
> >
> > On Sat, Nov 24, 2018, 14:31 ajs6f <ajs6f@apache.org wrote:
> >
> >> I would rather see a more complete offering with the other types in
> >> j.u.function, i.e. Consumer, Supplier, Predicate, the various
> >> primitive-specialized types...
> >>
> >> ajs6f
> >>
> >>> On Nov 24, 2018, at 6:58 AM, Pascal Schumacher <
> pascalschumacher@gmx.net>
> >> wrote:
> >>>
> >>> Hi Aleksander,
> >>>
> >>> thanks.
> >>>
> >>> Imho this would be a useful addition to commons-lang.
> >>>
> >>> Any other opinions?
> >>>
> >>> Cheers,
> >>> Pascal
> >>>
> >>> Am 21.11.2018 um 22:52 schrieb Aleksander Ściborek:
> >>>> Hi
> >>>> I've just created pull request
> >>>> <https://github.com/apache/commons-lang/pull/385> for
> CheeckedFunction
> >>>> interface. This is an example of utils I would like to add in order to
> >>>> simplify usage of java Stream.
> >>>> Aleksander
> >>>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Re: [Lang] CheckedFunction#unchecked

Posted by ajs6f <aj...@apache.org>.
In that case you might want to also look at some other choices people have made like

https://github.com/google/mug#maybe

or even more specialized facilities like

https://github.com/google/chkstream

I'm not against plain general functional types that handle checked exceptions (I imagine most of us have written them for ourselves at some point, which makes them a good candidate for Commons), but I've found that generally I end up with clearer code if I can use an idiom more specific to the task.

ajs6f

> On Nov 24, 2018, at 8:46 AM, Aleksander Ściborek <al...@gmail.com> wrote:
> 
> Of course you are right. I'm going to add new functions. The idea behind
> this pull request is to show what I want to create, that's why I marked PR
> as WIP (Work in Progress)
> 
> On Sat, Nov 24, 2018, 14:31 ajs6f <ajs6f@apache.org wrote:
> 
>> I would rather see a more complete offering with the other types in
>> j.u.function, i.e. Consumer, Supplier, Predicate, the various
>> primitive-specialized types...
>> 
>> ajs6f
>> 
>>> On Nov 24, 2018, at 6:58 AM, Pascal Schumacher <pa...@gmx.net>
>> wrote:
>>> 
>>> Hi Aleksander,
>>> 
>>> thanks.
>>> 
>>> Imho this would be a useful addition to commons-lang.
>>> 
>>> Any other opinions?
>>> 
>>> Cheers,
>>> Pascal
>>> 
>>> Am 21.11.2018 um 22:52 schrieb Aleksander Ściborek:
>>>> Hi
>>>> I've just created pull request
>>>> <https://github.com/apache/commons-lang/pull/385> for CheeckedFunction
>>>> interface. This is an example of utils I would like to add in order to
>>>> simplify usage of java Stream.
>>>> Aleksander
>>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> 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
>> 
>> 


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


Re: [Lang] CheckedFunction#unchecked

Posted by Aleksander Ściborek <al...@gmail.com>.
Of course you are right. I'm going to add new functions. The idea behind
this pull request is to show what I want to create, that's why I marked PR
as WIP (Work in Progress)

On Sat, Nov 24, 2018, 14:31 ajs6f <ajs6f@apache.org wrote:

> I would rather see a more complete offering with the other types in
> j.u.function, i.e. Consumer, Supplier, Predicate, the various
> primitive-specialized types...
>
> ajs6f
>
> > On Nov 24, 2018, at 6:58 AM, Pascal Schumacher <pa...@gmx.net>
> wrote:
> >
> > Hi Aleksander,
> >
> > thanks.
> >
> > Imho this would be a useful addition to commons-lang.
> >
> > Any other opinions?
> >
> > Cheers,
> > Pascal
> >
> > Am 21.11.2018 um 22:52 schrieb Aleksander Ściborek:
> >> Hi
> >> I've just created pull request
> >> <https://github.com/apache/commons-lang/pull/385> for CheeckedFunction
> >> interface. This is an example of utils I would like to add in order to
> >> simplify usage of java Stream.
> >> Aleksander
> >>
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>

Re: [Lang] CheckedFunction#unchecked

Posted by ajs6f <aj...@apache.org>.
I would rather see a more complete offering with the other types in j.u.function, i.e. Consumer, Supplier, Predicate, the various primitive-specialized types...

ajs6f

> On Nov 24, 2018, at 6:58 AM, Pascal Schumacher <pa...@gmx.net> wrote:
> 
> Hi Aleksander,
> 
> thanks.
> 
> Imho this would be a useful addition to commons-lang.
> 
> Any other opinions?
> 
> Cheers,
> Pascal
> 
> Am 21.11.2018 um 22:52 schrieb Aleksander Ściborek:
>> Hi
>> I've just created pull request
>> <https://github.com/apache/commons-lang/pull/385> for CheeckedFunction
>> interface. This is an example of utils I would like to add in order to
>> simplify usage of java Stream.
>> Aleksander
>> 
> 
> 
> ---------------------------------------------------------------------
> 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