

"I will never use Python in production ever again" - bslatkin
http://www.onebigfluke.com/2013/09/i-will-never-use-python-in-production.html

======
rtpg
>Static typing doesn't ensure correctness for languages like C++ and Java.

Types provide a pretty high amount of proof towards correctness, in theory and
in practice.

In my experiences working with Haskell (and its type-system), I've found the
amount of runtime bugs I hit to be almost non-existent, because usually the
type system catches all my stupidity beforehand. It's weird, because the type
of runtime bugs I get in other languages (like Python) are rarely type-related
issues, but for some reason it seems to help a lot.

The arguments for dynamic typing are very less convincing when you start
getting into systems with very expressive type systems such as Haskell.

There are so few use-cases of un-type-able code out there that it really
shouldn't be as demanding, but unfortunately people have conflated typing with
verbosity and uselessness, instead of things that can work extremely well as
proofs of some amount of correctness.

~~~
_random_
The ideal: "if it compiles it is guaranteed to work as you intended when
writing it".

~~~
freyrs3
Reality: "Type systems don't keep you from writing wrong logic, they only
forbid you to write inconsistent logic."

------
eropple
_> All other things being equal, I expect the total time spent in Python will
be lower than C++._

I hear this a lot, and for the most part, I don't really understand it. I know
Python and C++ at about the same level and for a lot of things I find myself
taking less time in C++, particularly with Boost giving me a bunch of handy
tools in my toolbox. I don't find static typing onerous, and it does save my
bacon more often than it gets in my way.

Nits about C++ aside, since there does exist the general perception of C++ as
having those problems, wouldn't a fairer comparison be Scala or C# as it
pertains to statically typed languages? (I don't know Scala great yet, but I
find myself able to build good, reliable code fairly quickly--although
sometimes, due to unfamiliarity, I end up writing code that's too clever and
it's hard to read afterwards--and I am _ridiculously_ more productive in C#
than Python. The miracle of a good IDE...)

~~~
_random_
He picked comparison that would make Python look good[-ish]. Or he is ignorant
about modern C#/Scala capabilities.

~~~
eropple
That was what I was driving at, yeah.

------
icedchai
This has nothing to do with tests. Tests would catch this, but so would
sensible development practices like running your code at least once before
deploying it.

~~~
freyrs3
That would catch the SyntaxError instances he mentioned but certainly not
every case of AttributeError or ValueError exception. Even good testing would
not catch all of them.

~~~
_random_
Indeed, regression tests are not a silver bullet. It's a patch for dynamic
type system.

------
babesh
I once ran into an issue where a base class's method's signature changed thus
breaking some subclasses. No compiler warning but also no refactoring support
either. If you ran tests only on the base class you would be fine. Especially
if different people were responsible for the base class and subclasses....
Wonder if Python tools have refactoring support...

