#structural-typing

[ follow ]
JavaScript
fromMedium
1 month ago

TypeScript "object" doesn't make sense

Objects in JavaScript differ from primitives; primitives can behave like objects via auto-boxing, while TypeScript uses structural typing to reflect shapes.
Python
fromPatrick Muller
1 month ago

Static Protocols in Python: Behaviour Over Inheritance

Protocols enable structural typing in Python by validating object behavior (methods/attributes) rather than relying on inheritance.
[ Load more ]