Re:Removing Garbage Collection from the Rust Language (2013)
by kaba0 on Monday September 11, 2023 @12:20PM
(#37469536)
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.
[ Parent
| on HN ]
Re:Removing Garbage Collection from the Rust Language (2013)
by Zambyte on Monday September 11, 2023 @01:10PM
(#37470289)
I 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.
Re:Removing Garbage Collection from the Rust Language (2013)
by kaba0 on Monday September 11, 2023 @01:19PM
(#37470422)
It 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).