3 ms·
> So now two popular dynamic languages have type hinting of a kind: Python (unenforced annotations) and PHP (declarations). Great! Don't forget Javascript, vi
by chimeracoder 11y ago
> So now two popular dynamic languages have type hinting of a kind: Python (unenforced annotations) and PHP (declarations). Great!
Don't forget Javascript, via Typescript (which predates both Python and PHP's typechecking): http://www.typescriptlang.org/ http://www.typescriptlang.org/
Typescript is a strict superset of Javascript that compiles very transparently to the equivalent Javascript, so I think it's close enough to what Python3 does to be included here.
The annotations are stripped out before runtime, but they are checked at compile-time for any errors that are possible to detect statically.
- wstrange 11y agoAnd Dart - which had optional types from the start.
- TazeTSchnitzel 11y agoTypeScript is a JS superset, though. It's not part of JS itself.