I’ve used many programming languages over the past 40+ years, including statically typed (eg, FORTRAN, Tandem TAL, C/C++, C#, Java, Go) and dynamically typed (eg, Smalltalk, Python) and both (eg, Objective-C). I understand both classes of languages very well.

As much as static typing proponents love to proclaim, static typing has never saved me from a lot of bugs. Most of the bugs I encountered when programming in C, Java, Go, etc. had nothing to do with data typing.

Similarly for dynamically typed languages. I recall very few Smalltalk or Python bugs that static typing could’ve prevented.

Now, it’s possible that I’ve been exceptionally careful about how I use variables. But I don’t think I’m alone in my experience that static typing has not made a huge difference in the quality and reliability of the programs I’ve written. This is further supported by scientific evidence.

After all, isn’t that why dynamically typed languages continue to be wildly popular? Python is the second most popular language in the world and one of the three most versatile (the other two are Java and C++). Ruby is also quite popular. Erlang is popular in domains where high availability is absolutely crucial for distributed, fault-tolerant applications. R is popular for data science and machine learning. Clojure is quite popular.

Despite its relative obscurity, Smalltalk is an eminently practical industrial language. It’s been used commercially for over three decades by well-known companies like JPMorgan, Desjardins, UBS, Florida Power & Light, Texas Instruments, Telecom Argentina, Orient Overseas Container Lines, Siemens AG, and so on. Check out ALLSTOCKER and ATMs in Moscow streets.

Smalltalk has not suffered from quality issues that supposedly arise from lack of static typing. The above major enterprises do not suffer fools.

These dynamic languages have not “encouraged bad habits.” I can see how JavaScript may encourage bad habits, but not Smalltalk, Ruby, Erlang, and Clojure.

Robert C. Martin (aka “Uncle Bob”) recently explained why dynamic languages are not a problem. The answer is three little letters: TDD.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store