3 comments

[ 2.3 ms ] story [ 15.6 ms ] thread
Hi. Python has typing. I use it exactly how you describe. First stage of module I develop is usually without types. As soon as I feel some stabilization - I think twice :) then add types and 'mypy' checks my module. My colleague says this idea came to python from TypeScript. Maybe it's true. I don't know TypeScript. BTW, Python's typing has Union, Optional, Any ... and I don't know equivalent type options in Go.
At the end chapter:

> The best example of explaining what I want is giving an example of what I really bugs me. Go throws an error whenever you have an unused variable.

This is really a idiosyncracy of Go, unrelated to safety, and comes I guess from the Rob Pike attributed dogmatic stance "We made a deliberate decision: no warnings. If it's worth complaining about, it's worth fixing."

Yeah true, it's not the best example, and completely unrelated to type systems, I agree.

Although warnings in someway are a safety mechanism so I think it could contribute to another section of the article, but it'd be much better to have a different example for that paragraph.

Thanks for the feedback