News for hackers. Stuff that matters.
Re:Pyrefly: Python type checker and language server in Rust by _flux on Tuesday October 14, 2025 @10:13AM (#45580252)
In some other typed languages, that is. E.g. in C++, OCaml, Haskell, F#, Kotlin, and Rust (a non-exhaustive list) you can have non-nullable strings, and other objects.
Re:Pyrefly: Python type checker and language server in Rust by asplake on Tuesday October 14, 2025 @10:37AM (#45580594)
It’s worth noting that even though the runtime allows nulls (i.e. None) anywhere, Python type checkers do distinguish between optional and mandatory types.
Re:Pyrefly: Python type checker and language server in Rust by scuff3d on Wednesday October 15, 2025 @01:05AM (#45588264)
In Zig you have to mark variables as nullable when they are declared. If you try to assign null to any variable that doesn't have it marked as such the program won't compile.

Any nullable type has to be unwrapped before accessing the value, or again, won't compile.