Why should there be an RNG in the standard library...
# announcements
r
Why should there be an RNG in the standard library? All the platforms Kotlin targets have libraries for that, so you could use those, or we could have a pure Kotlin version in its own library. This is getting #C09222272
m
ruckustboom: I'm not saying it should have complete implementation. For JVM
kotlin.Random
would be a
typealias
to
java.util.Random
.
k
right, this is how
List
is handled, for example
kotlin.List
typealiases to
java.util.List
r
That could work, but I'm still of the opinion RNGs aren't a standard library feature. Maybe I'm in the minority, but I prefer smaller standard libraries and having extra functionality be in separate libraries.
m
And even
kotlin.ArrayList
.
I see no problems in splitting it.
r
What do you mean by splitting it? I like the idea of typealiasing to existing libraries on a given platform, but I don't think it should be
kotlin.Random
. Maybe something like
kotlinx.Random
or even a separate
kotlinx.random
library that can forward to
Random
,
SecureRandom
, etc.
m
Splitting standard library.
k
I would be fine with a kotlinx with all of this stuff