3 ms·
Duck typing is still a type system that can be checked before running the code. Flow for JavaScrip does that while allowing to use comments for type annotations
by fpoling 10y ago
Duck typing is still a type system that can be checked before running the code. Flow for JavaScrip does that while allowing to use comments for type annotations. That is with Flow one has an option to program in idiomatic JavaScript that relies on Duck types and then check for type violations using the tool. The cool part of Flow is that it tries hard to check for various typical patterns making annotations minimal.