After years of using dynamically typed languages I'm a strong static-typing convert. Sure, you have easy up-front flexibility with dynamically typed languages. Sure, this may lend itself to rapid prototyping. But I've personally found that trying to write a program of any significant size with a dynamically-typed becomes a giant cluster-fuck. I might hit the ground running on a project, but I often find myself bogged down and having to backtrack and re-write significant amounts code if I don't enforce a stringent type-system in my program to begin with. Using a dynamic language and manually enforcing a type system doesn't make much sense to me when I can get the language to assist me with it.
In my opinion, dynamic languages are great for scripting or writing small chunks of code of maybe a few hundred lines. Little tasks where it's easier to mess around until you hit a solution and re-write as much code as needed (or even the whole program for that matter).
This post is so short, the case against dynamic typing is basically "Because it is bad." Surely someone could present a specific case showing the problems of dynamic typing where static typing is the clear winner.
With some modern languages, you have a third way: gradual typing, in which you use type annotations where you want them, instead of the language requiring them as most statically typed languages are designed.
4 comments
2 u/monetus 27 Jan 2016 18:47
For convenience, here is the blog this article sourced from, which it also linked to at the bottom.
2 u/The_Only_Other 27 Jan 2016 19:15
After years of using dynamically typed languages I'm a strong static-typing convert. Sure, you have easy up-front flexibility with dynamically typed languages. Sure, this may lend itself to rapid prototyping. But I've personally found that trying to write a program of any significant size with a dynamically-typed becomes a giant cluster-fuck. I might hit the ground running on a project, but I often find myself bogged down and having to backtrack and re-write significant amounts code if I don't enforce a stringent type-system in my program to begin with. Using a dynamic language and manually enforcing a type system doesn't make much sense to me when I can get the language to assist me with it.
In my opinion, dynamic languages are great for scripting or writing small chunks of code of maybe a few hundred lines. Little tasks where it's easier to mess around until you hit a solution and re-write as much code as needed (or even the whole program for that matter).
1 u/Tecktonik 27 Jan 2016 20:35
This post is so short, the case against dynamic typing is basically "Because it is bad." Surely someone could present a specific case showing the problems of dynamic typing where static typing is the clear winner.
0 u/cotyledon 02 Jun 2016 06:44
With some modern languages, you have a third way: gradual typing, in which you use type annotations where you want them, instead of the language requiring them as most statically typed languages are designed.