Re:Why Today's Python Developers Are Embracing Type Hints
by seanparsons on Sunday September 28, 2025 @08:54AM
(#45403990)
Not ignoring, I just didn't write an essay. In all that time working with TypeScript there was very little that I found to be gradually typed, it was either nothing or everything, hence my original comment. Sure some things might throw in a bunch of any/unknown types but those were very much the rarity and often some libraries were using incredibly complicated type definitions to make them as tight as possible.
Re:Why Today's Python Developers Are Embracing Type Hints
by choomahs187 on Sunday September 28, 2025 @11:44AM
(#45405191)
Worked with python, typescript and now php, seems that phpstan allows this gradual typing, while typescript kinda forces you to start with strict in serious projects.
For example what I like about PHPStan (tacked on static analysis through comments), that it offers so much flexibility when defining type constraints. Can even specify the literal values a function accepts besides the base type. And subtyping of nested array structures (basically support for comfortably typing out the nested structure of a json the moment I decode it).