> Think about the way Python or Ruby deals with lists and you don’t know what the elements of the list are — and it’s too late to find a bug when you accidentally append a string to a list that was only meant to contain integers — and then you’d wonder why these are “modern” programming languages.
He seems like a C++ expert, but this quote suggests that he doesn't really get dynamic languages. Sure, this is a classic argument against dynamic typing, but the practice shows the sky doesn't fall because of that, and it makes programmers much more productive. Also dynamic languages put more focus on unit testing, which is necessary for C++ code as well. The fact that a program passes through the compiler doesn't necessarily mean that it is correct.
I think dynamic languages, Python in particular, are great for small scale and/or throw-away code like data analysis projects or algorithm prototyping.
However I'd personally be very wary of using them for large scale software systems that need to be maintained over long periods of time, because of this lack of compile time type safety.
This is a long-standing debate and I don't thing that it makes sense to dive too deep into that in this thread. I'll just say that I don't agree with that and point you to Bruce Eckel's essay Strong Typing vs. Strong Testing[1]. Not to mention that there are numerous large (not huge) systems written in dynamic languages that prove otherwise.
7 comments
[ 5.7 ms ] story [ 26.4 ms ] threadWhile the book isn't free, this blog thoroughly covers the book and the lessons learned from it in a lecture series:
http://cpp-next.com/archive/2009/11/%E2%80%9Celements-of-pro...
He seems like a C++ expert, but this quote suggests that he doesn't really get dynamic languages. Sure, this is a classic argument against dynamic typing, but the practice shows the sky doesn't fall because of that, and it makes programmers much more productive. Also dynamic languages put more focus on unit testing, which is necessary for C++ code as well. The fact that a program passes through the compiler doesn't necessarily mean that it is correct.
However I'd personally be very wary of using them for large scale software systems that need to be maintained over long periods of time, because of this lack of compile time type safety.
https://docs.google.com/View?id=dcsvntt2_25wpjvbbhk