News for hackers. Stuff that matters.
Re:From zero to 10M lines of Kotlin by randy909 on Tuesday October 25, 2022 @11:33AM (#33331977)
I've used both and Kotlin was a better overall experience for me. TypeScript has weird typing problems far more often due to the underlying runtime being dynamically typed.
Re:From zero to 10M lines of Kotlin by purplerabbit on Tuesday October 25, 2022 @12:28PM (#33332788)
What problems in particular have you run into? Genuinely curious.
Re:From zero to 10M lines of Kotlin by lf-non on Tuesday October 25, 2022 @01:27PM (#33333593)
While I like TS and it is my primary language currently, having worked with Kotlin in past I find the dev experience with kotlin to much better, esp. if you steer clear of libraries that lean heavily on bytecode weaving, compiler hooks etc.

Kotlin's type system is nominative and so while it is not as flexible as typescript (no intersection types, conditional types etc.) it also means that you don't run into those multi-page long type errors which need 5 mins of debugging to figure that some deeply nested object is null where undefined is expected.

It is particularly funny when the language server truncates the errors and it becomes impossible to infer the actual issue from the message. Every now and then I find myself extracting things out of objects and adding type annotations to simplify the errors. It is doable, but never needed in Kotlin.