Re:Type hints – a mediocre programmer's reaction (2015)
by nv-vn on Thursday March 17, 2016 @08:18PM
(#11308821)
"Duck typing" can be done statically through row polymorphism. For more info, read up on OCaml's object system.
[ Parent
| on HN ]
Re:Type hints – a mediocre programmer's reaction (2015)
by mascarenhas on Friday March 18, 2016 @08:58AM
(#11311452)
You only need row polymorphism if you want full type inference. You can get away with width subtyping with bounded parametric polymorphism if you are willing to give up on inferring all types. Examples: Go, TypeScript, Flow...