News for hackers. Stuff that matters.
Re:Python’s “type hints” are a bit of a disappointment to me by andrewingram on Friday April 22, 2022 @07:50AM (#31120472)
TypeScript has a more powerful type system, but arguably it's less powerful because the hints are invisible to runtime code. Python doesn't do any runtime type checking by default, but the hints are accessible in code, which unlocks a fair amount of power. For example, Strawberry is a GraphQL server library that allows you to define your GraphQL schema using the same syntax as dataclasses.

There are no comments on this comment yet.