5 ms·
I love Clojure and dynamic typing and actively use it in one of my commercial projects. However, my observation as an instructor is that static typing fixes a
by ludwigvan 9y ago
I love Clojure and dynamic typing and actively use it in one of my commercial projects.
However, my observation as an instructor is that static typing fixes a lot of issues in day-to-day coding of average (boring) projects, especially in projects where the average caliber of the programmers is low. It is not that it prevents bugs per se, but makes the creation process much smoother for people via instant feedback that the code won't work/compile at all.
- sanderjd 9y agoI believe it also fixes a lot of issues in day to day programming of non-boring projects where the average caliber of programmers is high. The "me and my team are too smart and our project is too interesting to benefit from static analysis!" meme is silly.
- Hupriene 9y agoIt's less about being smart and more about having habits that fill in the gaps that a lack of static analysis leaves. This can happen through TDD or through REPL driven development. Each has their own strengths and weaknesses.
- sanderjd 9y agoREPLs are super nice, TDD is super useful, but neither of them either preclude or obviate the advantages of static analysis. Although in practice, none of the popular statically typed languages has a standard REPL (except maybe TypeScript?) which is really a shame. But I agree with you that it has nothing to do with smart vs. less smart.
- throwaway7645 9y agoOn the other side of the coin, static typing doesn't catch a lot of things that TDD & REPL development can, although nothing prevents you from using tests with static typing.
- sanderjd 9y agoNo static typing advocates suggest that you shouldn't write unit tests - they just suggest that you can write dramatically fewer tedious but important tests that boil down to verifying type safety.