News for hackers. Stuff that matters.
Re:Pyrefly vs. Ty: Comparing Python's Two New Rust-Based Typ... by luoc on Tuesday May 27, 2025 @01:16PM (#44108863)
Well then support an option to enable that kind behaviour? Make it an explicit decision by the devs. I think running in a type error and then adding an exception to your config is safer than silently pass and only learn about the mixed types in a production bug
Re:Pyrefly vs. Ty: Comparing Python's Two New Rust-Based Typ... by fastasucan on Tuesday May 27, 2025 @04:52PM (#44110574)
The tool doesn't have a version number yet, its in preview. Chill.
Re:Pyrefly vs. Ty: Comparing Python's Two New Rust-Based Typ... by shoeb00m on Tuesday May 27, 2025 @08:10PM (#44111714)
I think this should be handled by a type assisted linter not typechecker.

Imo a type checker in a dynamic language should is primarily there to avoid runtime errors. In a list with multiple types the typechecker should instead force you to check the type before using an element in that list.

If you want static types python is the wrong language