2 ms·
> In JavaScript, functions don’t have a return type, you don’t know what can be returned by the function Do engineers actually depend on the compiler to save t
by z3t4 9y ago
> In JavaScript, functions don’t have a return type, you don’t know what can be returned by the function
Do engineers actually depend on the compiler to save their ass and don't bother looking up in the documentation or reading the source code to see what a function returns !? No I don't think so. There's a saying that every bug that ever existed in a static typed language actually did pass the type checks. If the compiler finds a bug it's rather luck that the two parameters passed in the wrong order was not both of the same type, and not because of better language design. If you don't know what a function returns, you can say "bad documentation", or "bad code", but don't blame it on the language.