3 ms·
Or if someone really want to play around with types: Scala, especially Scala 3. People can’t even say that it is not nullsafe, as it is.
by kaba0 3y ago
Or if someone really want to play around with types: Scala, especially Scala 3. People can’t even say that it is not nullsafe, as it is.
- Zambyte 3y agoI haven't used Scala since 2. Did something change related to null with 3? Can you no longer use null? I know it has the Option type which can be used to safely represent nullable values, but that is (or at least was) in addition to, rather than in replacement of null.
- kaba0 3y agoIt has a compiler flag which will remove the null value from most type’s sets, that is a String will never contain null, if you want it to be nullable you have to write `String | None` (or Null? Something like that).