Would it make sense to translate what's missing of the Java standard library in Kotlin common code?

Maybe start with repository issues?

Maybe kotlin-multiplatform-stdlib-extras ?

stdlib is multiplatform by default. I think it is OK, but it has some claim for being official stdlib addition which is not correct.

Official would be something like kotlinx-stdlib-extras :slight_smile:

And point is - on JVM and Android it would be just bunch of actual typealias ..., but on ios, posix etc - have non-trivial implementation.

Do you have example of what do you want? We started with the treemap. I am not sure JS has them out of the box.

Well, just open for example avian/TreeMap.java at master · ReadyTalk/avian · GitHub , press ctrl-shift-alt-k and fix conversion errors.
Repeat.

Is there any call for immutable variants of the TreeMap and other data types?

It depends on what do you mean by “immutable”. Real immutable collections live here. But what we usually mean by immutable are actually read-only.

By the way, good idea. If we will implement something form scratch, we’d better make separate implementations for writable and read-only ones.

I’ve created a Slack workspace to discuss about the library.
See below

oh, another slack workspace. Do we really need it right now? I have two already. Maybe use general kotlin slack or create channel there?

yeah why not! have we the privileges to create a channel there? If so create one and put the link here!

It is better to reuse existing channel like this one: Slack

1 Like

I was thinking of persistent and immutable analogues of the Java Collections Framework.

Not sure it makes much sense - on Native you just call .freeze() on regular collection, and it become immutable.

The problem with GPL/(and a little less of a problem with LGPL) is that companies get a lot of problems if they want to use such a licensed library: they will be fore to share their closed/private code in specific circumstances and they don’t want to risk that. So everything that is touched by GPL is infected. Apache and MIT and a lot of others don’t have this problem: they are more commercial friendly.

4 Likes

Does a community project really need to worry about commercial friendliness? (Disclaimer: I am an open source supporter and AGPL lover)
(I think this might result in endless heated debates, so maybe just ignore my comment)

:person_gesturing_no::person_gesturing_no:

Have you seen these libraries: KorGE Game Engine & Korlibs · GitHub ? Most of them are implemented in common code (e.g. many data structures in GitHub - korlibs-archive/kds: Data Structure library for Kotlin).

Yeah I had a look at it. It is primarily focused on what they need to do some pretty specific tasks, not everything, but most of the library is. I want to create something way more general and present in the Java standard library.

It increases the number of people and organizations who will participate in the project, which is usually good for the project.

1 Like