why i (at least sometimes) hate type inference

Skip to first unread message

Raoul Duke

Nov 15, 2021, 2:04:53 PM11/15/21
to pi...@googlegroups.com
i mean, we all should probably already be insightful and experienced enough to be able to make critiques against it. 

the crux of the nut of the problem is the inferred types are invisible. 

Mike Austin

Nov 15, 2021, 5:28:54 PM11/15/21
to PiLuD
I remember this topic came up before  - so how do we make them visible? eslint, the JavaScrpt checker/formatter can be set up to run and fix/format code on save. The same could be done for adding types. To be safe, they could be added as comments such as in Flow. Or, the editor could show the type of expressions or functions in a side panel of the code, or as metadata above each expression or function (not part of the code, but like Xcode inline errors).

Reply all
Reply to author
0 new messages