Why not to allow native threads in Kotlin Native?

Hi all,

This question is provocative a little-bi, I just want to raise discussion again about this topic …
Such “native” languages like Rust also sometime ago did not have a native threads, but after sometime they decided to add it, because “native” language that do not support native capability is strange …

Of course I like the approach that currently Kotlin Native has, because it is one of my most loved concurrency/parallel programming pattern Active Object, Actor and other names that it has …

But “native” capability is essential for Kotlin Native even if it is unsafe … To deal with unsafety you could add Thread class under kotlin.native.unsafe.Thread package …

Also adding Kotlin Native Thread class will allow to write wrapper Thread class kotlin.Thread that could be used across Java, Native and probably other platforms supported in future …

I do not thing that threading is universal across platforms. You can probably use POSIX threads for systems that support it.

1 Like