Re:Things I Was Wrong About: Types
by eyelidlessness on Sunday September 27, 2020 @06:16PM
(#24610578)
To be fair, JS’s dynamic types aren’t solely to blame for this. There are dynamically typed languages that don’t require you to read an entire function body to know if it returns something. But, those are languages without statements, and all functions return something.
Yes! This drives me nuts about JavaScript! Untyped parameters are one thing, but having to read the entire function just to know if it returns anything is ridiculous.