Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I agree principally, however I haven't found it to be an issue.

Kotlin is rather literal in it's translation. Arrays are mapped to arrays, interfaces are mapped to objects.

Plus you can use plain javascript anywhere in your code:

    val p: MyTypedObject = js("new require('something.js').default")

    val other: MyTypedObject
    js("Object.assign(other, p")
Or you write wrappers which do what you think they do:

    @JsModule("react")
    external object React {
        fun createElement(name: String, props: dynamic, vararg children: dynamic): ReactElement

        interface ReactElement {}
    }
It's definitely necessary to understand both languages though.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: