Javascript to Elm

13: To Type or Not to Type

Informações:

Synopsis

  Static v Dynamic Types Definitions First Static type systems perform type checking at compile-time, while dynamic type systems distinguish types at run-time. In our case JS is dynamic and Elm 2.0 which introduced strict null checking. We reviewed our corpus and found that 22 bugs, an increase of 58%, are detectable under TypeScript 2.0 but not under TypeScript 1.8. This result decisively and quantitatively demonstrates the value of TypeScript 2.0’s strict null checking. Free as in Beer nothing comes for free, so what was the cost this study found for developers to add type annotation to their JavaScript code ? Token “The token tax rests on the intuition that each token must be selected, so this proxy measures the number of decisions a programmer must make when adding type annotations” Time That one is pretty self explanitory. lol   Token Tax Mean Token Tax Median Time Tax (s) Mean Time Tax (s) Median Flow 1.7 2 231.4 133 TypeScript 2.4 2 306.8 262 handling modules was the most time-consu