Re:Why don't more languages offer flow typing?
by baby on Monday April 04, 2022 @01:26PM
(#30909418)
What’s the difference with type inference? Is it that flow typing can happen at runtime for just in time /noncompiled languages?
[ Parent
| on HN ]
Re:Why don't more languages offer flow typing?
by yxhuvud on Monday April 04, 2022 @01:54PM
(#30909792)
Flow typing is basically a kind of type inference where the derived type of a variable is allowed to be different in different places of the code, based on control flow. However, not all type inference is flow typing.
Flow typing is definitely a thing also in compiled languages, one example is Crystal, which is both compiled and has flow typing.