Sound Dart
summary
A sound type system called strong mode layers onto Dart to let ahead‑of‑time compilation generate smaller, debuggable output and to power better IDE completions; it enforces stricter override and function subtyping rules, forbids dynamic generic masquerading, and inserts runtime downcasts (currently implemented in the Dart dev compiler). Type inference treats var as inferred (not dynamic), adds generic methods and pushes types through expressions, surfacing latent bugs like treating an iterable as a list. Analyzer, CLI (--strong), IntelliJ and DartPad already support it and adoption at Google is growing rapidly.
AI-written summary · about
chapters (11)
- 0:00Introduction to Dart Soundness
- 1:00What is Soundness?
- 3:07Benefits of Soundness
- 5:05Strong Mode Overview
- 7:13Sound Type System Changes
- 10:17Runtime Checks
- 12:14Type Inference
- 16:45Strong Mode Demo
- 20:20Latent Bug Detection
- 22:36Generic Methods
- 24:24Future Work and Conclusion
related talks
28mGoing Static, Gradually: Semantic Soundness and Telling the Truth at Scale
15mWhy null safety?
42mDart null safety in Action
40mRevving up your Flutter IDE
47mInteractive development with Dotty
30mAccelerating the Dev Loop with DCM Lints at Betterment
21mGradual Typing is the best!
25mStatic types in JavaScript: what, how and why
