Arjan van Wieringen

04/24/2023, 1:32 PM
Just a wild idea, but would something like Indexed Access Types be possible in Kotlin in the future? Or is there some severely limiting architectural aspect? I use it in Typescript quite a lot and it makes some things quite easy. For instance, when making this in pseudo-Kotlin code:
interface User {
   id: UUID
   name: String

// here = UUID
fun findUserById(id: {
 // ....

Amejonah 1200

04/24/2023, 2:16 PM
Reminds me of Rusts Associated Types