Lunch talks #7: A Type System tour
Welcome to another series of our Lunch Talks! This week we'll have four different talks about type systems so we can do a better job on our day to day work. Type Systems might not be the coolest topic ever, so I tried to find a nice balance of videos covering how type systems work in different programming languages, and even how dynamic languages can have some benefits of a type system without having one.
Sometimes, undefined is not a function. As mortal programmers, we ship bugs to production everyday. Bugs slow us down, frustrate our users, and cause us to have crises of confidence. Don't go alone–type systems in technologies such as TypeScript, Flow, and GraphQL can improve your confidence and help you ship less bugs.
Lauren dives into the practical benefits you'll get from embracing types. You'll walk away with a better understanding of why type systems help you write better programs, and some functional programming tips you can use today.
Why not let our computers do most of this checking for us? Type systems are a way to annotate our programs so that computers can do a lot of the work we used to rely on experts for. Advanced type systems have been around for a while, but they haven’t seen much adoption until recently.
clojure.spec comes with a promise of better runtime checking, improved error messages, and a shared vocabulary for communicating the structure of data, much of the benefits of types but still keeping Clojure a dynamic language. In this hands-on talk Arne starts with the basics, then work up to more complex examples. He shows how to instrument functions, parse data, and do generative testing.
Flow and TypeScript promise “types in js” - but what does that get you, exactly? What’s the experience of adding types to a large project? Is the overhead worth it for you and your team? In the end, type systems will give you more confidence in your code, fewer bugs, and a much friendlier codebase.
Further reading and watching
- Exploring the Strongly Typed Graph by Lauren Tan
- TypeScript 2.8: Conditional Types by Marius Schulz
- "Agility & Robystness: Clojure spec" by Stuart Halloway (40 min)
- "Robust APIs with clojure.spec & GraphQL" by Lily Goh and Dom Kiva-Meyer (39 min)
- "Type System Tips for the Real World" by Sean Griffin (25 min)