Python's New Type Hints in Action… In JavaScript

Publié le: 09 septembre 2015
sur la chaîne: Python New Zealand
397
3

Christopher Neugebauer
https://kiwi.pycon.org/schedule/prese...
Depending on who you ask, PEP 484's Type Hints are either the next big thing in Python, or the harbinger of doom upon our entire community. Which is it?

Allowing optional static typing in Python will bring with it some benefits that other languages have had for years: IDEs will be able to do code completion better; a whole class of boring tests will fall out automatically; and some bugs will be easier to catch.

But this is also undeniably a huge change of direction: will it mean you have to substantially change your code style? Will Python's simple expressiveness suddenly become unattainable thanks to clumsy Java-style type declarations?

To show how PEP 484's Gradual Typing system works, we're going to look at TypeScript, a minimal implementation of Gradual Typing over JavaScript. We'll see how the type system works, and how it fits into the already thriving JavaScript developer community, where most people aren't using type hints at all.

We'll draw some parallels with how Python's implementation will work, and see what Python can learn from a language that has successfully made the jump to a type-hinted world.


Sur cette page du site, vous pouvez voir la vidéo en ligne Python's New Type Hints in Action… In JavaScript durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Python New Zealand 09 septembre 2015, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 397 fois et il a aimé 3 téléspectateurs. Bon visionnage!