Re: Creating a Kotlin Commons Lang Package

2020-08-23 Thread Miguel Muñoz
Kotlin has an "extensions" feature that is more powerful than simply calling a Java method from Kotlin. Here's an example, from the Kotlin language guide: fun MutableList.swap(index1: Int, index2: Int) { val swap = this[index1] // 'this' corresponds to the list this[index1] = this[index2]

Re: Creating a Kotlin Commons Lang Package

2020-08-18 Thread Isira Seneviratne
Exactly. Okio has done a similar conversion from Java to Kotlin. On Tue, Aug 18, 2020 at 10:32 AM Adwait Kumar Singh < theadvaitkumarsi...@gmail.com> wrote: > Yeah we could call it from Kotlin but the point is to re-wr

Re: Creating a Kotlin Commons Lang Package

2020-08-17 Thread Isira Seneviratne
I'd also be happy to join. On Tue, Aug 18, 2020, 6:15 AM Miguel Muñoz wrote: > I'd be happy to join you. > > On Mon, Aug 17, 2020 at 5:24 AM Adwait Kumar Singh < > theadvaitkumarsi...@gmail.com> wrote: > > > Hi all, > > > > I created this issue https://issues.apache.org/jira/browse/LANG-1599 to

Re: Creating a Kotlin Commons Lang Package

2020-08-17 Thread Adwait Kumar Singh
Yeah we could call it from Kotlin but the point is to re-write most of the utils as Kotlin extensions functions which are more cleaner, concise and easy to discover. On Tue, Aug 18, 2020 at 6:43 AM Hasan Diwan wrote: > Couldn't you follow the directions at > https://kotlinlang.org/docs/referenc

Re: Creating a Kotlin Commons Lang Package

2020-08-17 Thread Hasan Diwan
Couldn't you follow the directions at https://kotlinlang.org/docs/reference/java-interop.html to call the Java methods from Kotlin? Or am I missing something? -- H On Mon, 17 Aug 2020 at 17:45, Miguel Muñoz wrote: > I'd be happy to join you. > > On Mon, Aug 17, 2020 at 5:24 AM Adwait Kumar Sing

Re: Creating a Kotlin Commons Lang Package

2020-08-17 Thread Miguel Muñoz
I'd be happy to join you. On Mon, Aug 17, 2020 at 5:24 AM Adwait Kumar Singh < theadvaitkumarsi...@gmail.com> wrote: > Hi all, > > I created this issue https://issues.apache.org/jira/browse/LANG-1599 to > discuss the possibility of creating a Kotlin version of the current project > which would le

Creating a Kotlin Commons Lang Package

2020-08-17 Thread Adwait Kumar Singh
Hi all, I created this issue https://issues.apache.org/jira/browse/LANG-1599 to discuss the possibility of creating a Kotlin version of the current project which would leverage extension functions to provide cleaner and concise utility functions. Also we would only include those methods which are