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

Scala 3 has a compiler flag that makes `null` its separate type, making it completely null-safe.

This would e.g. make

``` val a: String | Null = someLegacyJavaCodeReturningNullableString()

```

and explicit null check would only make the non-nullable string continue onward.



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

Search: