3 ms·
"No; The line has to be executed for the error to show up in a dynamic language." That may be true for some dynamic languages with primitive tools and implemen
by alec 16y ago
"No; The line has to be executed for the error to show up in a dynamic language."
That may be true for some dynamic languages with primitive tools and implementations, but is not inherent in dynamic languages. For example, SBCL will alert me to branches that are impossible to take, adding strings and numbers, and even more if I've specified types (which is optional). As an added bonus, if I'm using SLIME in emacs, the s-expressions in question will be highlighted with a note. Factor and Scheme will perform similar tricks, and there's even Typed Scheme, which lets you convert your dynamically-typed code to statically-typed code incrementally.
- ori_b 16y agoThat's a form of static typing (via type inference)