You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Isira Seneviratne <is...@gmail.com> on 2020/05/11 09:06:28 UTC

[ALL] Creating Utils method wrappers for Kotlin

Hi all,

Earlier, I started a discussion about porting the Utils classes in Commons
Lang to Kotlin, but Gilles Sadowski suggested that this approach could be
extended to the Utils classes of all the Commons libraries.

For anyone who has not seen the other discussion, this
<https://github.com/Isira-Seneviratne/commons-lang-kt> repo includes the
Kotlin code I have written so far for Lang.
--
Isira Seneviratne
isirasen96@gmail.com

Re: [ALL] Creating Utils method wrappers for Kotlin

Posted by Gilles Sadowski <gi...@gmail.com>.
2020-05-11 11:55 UTC+02:00, Isira Seneviratne <is...@gmail.com>:
> On Mon, May 11, 2020, 3:22 PM Gilles Sadowski <gi...@gmail.com> wrote:
>
>> 2020-05-11 11:06 UTC+02:00, Isira Seneviratne <is...@gmail.com>:
>> > Hi all,
>> >
>> > Earlier, I started a discussion about porting the Utils classes in
>> Commons
>> > Lang to Kotlin, but Gilles Sadowski suggested that this approach could
>> > be
>> > extended to the Utils classes of all the Commons libraries.
>>
>> What I actually meant is whether/how a component could be
>> "wholly" ported.
>
>
> I'd say that it isn't necessary to port the entirety of a component, as
> Java code can be called in Kotlin without issue.
>
>   [Why focus on "Utils" classes?]
>
>
> Because their methods can be written as extension functions.

Sorry for the perhaps naive discussion: I don't know Kotlin (except
for the name).  But still, if "Java code can be called in Kotlin without
issue", why is something to be done here in Commons?

In particular, "Utils" classes are not something to be especially
proud these days.  I they deserve special handling, it would rather
be in the form of refactoring them as non-"Utils". ;-)

Regards,
Gilles

>> > [...]

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


Re: [ALL] Creating Utils method wrappers for Kotlin

Posted by Isira Seneviratne <is...@gmail.com>.
On Mon, May 11, 2020, 3:22 PM Gilles Sadowski <gi...@gmail.com> wrote:

> 2020-05-11 11:06 UTC+02:00, Isira Seneviratne <is...@gmail.com>:
> > Hi all,
> >
> > Earlier, I started a discussion about porting the Utils classes in
> Commons
> > Lang to Kotlin, but Gilles Sadowski suggested that this approach could be
> > extended to the Utils classes of all the Commons libraries.
>
> What I actually meant is whether/how a component could be
> "wholly" ported.


I'd say that it isn't necessary to port the entirety of a component, as
Java code can be called in Kotlin without issue.

  [Why focus on "Utils" classes?]


Because their methods can be written as extension functions.


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

Re: [ALL] Creating Utils method wrappers for Kotlin

Posted by Gilles Sadowski <gi...@gmail.com>.
2020-05-11 11:06 UTC+02:00, Isira Seneviratne <is...@gmail.com>:
> Hi all,
>
> Earlier, I started a discussion about porting the Utils classes in Commons
> Lang to Kotlin, but Gilles Sadowski suggested that this approach could be
> extended to the Utils classes of all the Commons libraries.

What I actually meant is whether/how a component could be
"wholly" ported.  [Why focus on "Utils" classes?]

Regards,
Gilles

> [...]

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