Further to my earlier comments... On Sun, 17 Jun 2018 12:07:14 -0700, Jim Lee wrote: > IMHO, trying to shoehorn static type checking on top of a dynamically > typed language shows that the wrong language was chosen for the job.
Relevant: http://lambda-the-ultimate.org/node/1519 and this quote is extremely pertinent: Giving people a dynamically-typed language does not mean that they write dynamically-typed programs. -- John Aycock Lots of people have observed that *nearly all* real Python code is much less dynamic than the language allows. When you call "len(x)", the compiler has to resolve the name "len" at runtime in case it has been monkey-patched or shadowed, but in practice that hardly ever happens. Moving the type-checking out of the core language into the IDE or linter which can be used or not used according to the desire of the programmer is an elegant (partial) solution to the problem that testing can never demonstrate the absence of bugs, only their presence, without compromising on the full range of dynamic programming available to those who want it. -- Steven D'Aprano "Ever since I learned about confirmation bias, I've been seeing it everywhere." -- Jon Ronson -- https://mail.python.org/mailman/listinfo/python-list