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.
- 5 more replies
New conversation -
-
-
fwiw Go does this too in interface switches. No explicit cast necessary
-
Neat! When did they add that (and can you point to the docs on it)?
- 3 more replies
New conversation -
-
This Tweet is unavailable.
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.