EDIT: The repo is up if you have any port of a missing class in common code don’t hesitate to pull request! Any help is very much appreciated.
First question of all, would it be legal? And then, would it make sense?
My first thought goes to java.util (damn I want those tree maps so bad).
Would a community powered repository make sense?
I think in would be good idea to try. As far as I can understand, Kotlin team is currently stretched very thin, so any help would be good. So if you start the repository, I think the community could help. And later some parts of it could be merged in stdlib or distributed as stdlib-extras.
Well, here it is, I’ve sent you the collaboration invite. The problem now it what codestyle to use? I don’t think that translating 1-to-1 Java into Kotlin common would be possible or make sense.
First of all, I do not like the name. It interferes with kotlin common modules. Maybe kotlin-extras?
As for content, we should start with things we need. No reason to port everything. I think that some kind of voting process is in order, like implement the feature if it has more than some number of votes. Would you write a list of features that you really miss in everyday multiplatform kotlin?
I’m not lawyer, and do not really understand too…
But GPL definitely differs from Apache/MIT/etc, and if it intended to eventually be included to stdlib - it should not be under GPL/LGPL.
You can transpile Java to JavaScript or compile bytecode to native code. Kotlin can call Java. Is there any particular reason for doing such work beyond a vague feeling that it’s better if everything is in Kotlin?
I agree, it was the first thing that popped in my mind.
May work, more ideas?
Totally agree. I can write my owns but I cannot speak for everybody. Is there a service you recommend (something like Lithium Ideas, it is costly tho)?
Well I do not as well but since the Kotlin stdlib is Apache 2.0 I’d go for the Apache one as well.
Say a company have to build their library for iOS and Android. If you have a comprehensive stdlib for the common module you could do that in a snap! Write once, test once, compile once, release once, ecc…
The are many more use cases where other languages just could not do the same job in a such easy way.
Kotlin aims to create a number of multi-platform libraries to simplify further multi-platform development. Things like a TreeMap in fact do not require any platform-specific tricks, but are used quite frequently. I am not saying kotlin community should blindly duplicate everything there is in Java, but some things are worth having without to spell them explicitly when writing JS application.
And no, you can not directly compile bytecode to native code, at least (you can do it with Graal) the result will be quite different from the one produced by kotlin-native.