"To type or not to type: quantifying detectable bugs in JavaScript" https://blog.acolyer.org/2017/09/19/to-type-or-not-to-type-quantifying-detectable-bugs-in-javascript/ Haven't read it very deeply, but seems of interest.As a curiosity, the first example of bug wouldn't be possible in Lua, because it's better designed.
Jorge