TypeScript (and Flow probably?) might be the biggest industry adopters of typestate so far.
The TS compiler seems to be reasoning based on the CFG — stuff like “if (foo instanceof B) return; /* foo has type A here */“ works
-
-
This is called "occurrence typing" these days (I coined this term, also independently others did) -- typestate refers to something else.
-
But yes, it's been very cool to see this move from academic systems to TypeScript/Flow/etc.
- 4 more replies
New conversation -
-
-
Go and Dart have examples of this too.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.