[)roi(]
Executive Member
- Joined
- Apr 15, 2005
- Messages
- 6,282
Here's an interesting topic that came up on dynamic vs. static typing and the current pursuits of static typng in functional programming when we have processes like TDD. Here's the article's conclusion:
I find it strange that Uncle Bob's argument seemingly fixated on a this or that choice; because choosing static typed languages and/or functional programming (FP) doesn't implicitly mean you've chosen to avoid TDD. More importantly FP requires that functions clearly define their inputs/outputs i.e. it actively enables TDD.
Dynamic on the other hand, which Uncle Bob champions is arguably far more difficult to test for, especially when we consider that much of its state is all but unknown until runtime.
http://blog.cleancoder.com/uncle-bob/2016/05/01/TypeWars.htmlAnd so here we are. The pendulum is quickly swinging towards dynamic typing. Programmers are leaving the statically typed languages like C++, Java, and C# in favor of the dynamically typed languages like Ruby and Python. And yet, the new languages that are appearing, languages like go and swift appear to be reasserting static typing? So is the stage for the next battle being set?
How will this all end?
My own prediction is that TDD is the deciding factor. You don't need static type checking if you have 100% unit test coverage. And, as we have repeatedly seen, unit test coverage close to 100% can, and is, being achieved. What's more, the benefits of that achievement are enormous.
Therefore, I predict, that as TDD becomes ever more accepted as a necessary professional discipline, dynamic languages will become the preferred languages. The Smalltalkers will, eventually, win.
So says this old C++ programmer.
I find it strange that Uncle Bob's argument seemingly fixated on a this or that choice; because choosing static typed languages and/or functional programming (FP) doesn't implicitly mean you've chosen to avoid TDD. More importantly FP requires that functions clearly define their inputs/outputs i.e. it actively enables TDD.
Dynamic on the other hand, which Uncle Bob champions is arguably far more difficult to test for, especially when we consider that much of its state is all but unknown until runtime.
Last edited: