News for hackers. Stuff that matters.
Re:Kotlin for JavaScript by scns on Sunday March 27, 2022 @07:16AM (#30819391)
Kotlin makes it easy to avoid the "billion dollar mistake" i.e. using null.
Re:Kotlin for JavaScript by vips7L on Sunday March 27, 2022 @07:28AM (#30819439)
That has nothing to do with scale.

Quite honestly though, I don’t see null as that big of a deal. I haven’t struggled with it since I began programming 10 years ago.

Re:Kotlin for JavaScript by scns on Sunday March 27, 2022 @09:32AM (#30820092)
A big study by Microsoft (IIRC) said that ~70% of bugs came from NPEs.
Re:Kotlin for JavaScript by vips7L on Sunday March 27, 2022 @10:38AM (#30820561)
That is interesting. I'm not against compiler enforced null checking, but it's not the killer feature that would convince me to switch to Kotlin from Java.
Re:Kotlin for JavaScript by lolinder on Sunday March 27, 2022 @10:54AM (#30820680)
Your mileage may vary, but for me it's crucial—I can't use a language in production that doesn't have null safety. I want the compiler to force me to consider edge cases, and in many languages the biggest edge case of all is "that value you thought was there isn't actually there".