News for hackers. Stuff that matters.
Re:Diminishing returns of static typing by y4mi on Monday October 02, 2017 @02:38PM (#15386567)
> I still write 90% of my useful code in python, but that one week of debugging was exhausting & basically wouldn't have even compiled in a statically declared language.[...]

nothing stops you from using static typing with python3

Re:Diminishing returns of static typing by nightski on Monday October 02, 2017 @02:41PM (#15386604)
I haven't used optional typing in python. However, the problem I see with optional typing is that while I may choose to use it my team mates might not. Even more importantly, the 3rd party dependencies I use probably don't. So the amount of code that actually uses the types would be very limiting. Saying the choice is entirely up to you personally is a misnomer.
Re:Diminishing returns of static typing by gipp on Monday October 02, 2017 @03:07PM (#15386884)
Strict use of type annotations has to be a team decision, yes. Checking for them can be integrated into a CI build, though.

The typing spec provides for supplementary "stub files" that can be provided for third-party dependencies without their own annotations. The typeshed project provides these for a fair and quickly increasing number of common dependencies, and is plugged into pycharm and mypy by default: https://github.com/python/typeshed

Re:Diminishing returns of static typing by yawaramin on Monday October 02, 2017 @03:43PM (#15387259)
I think GP meant 'you' as in 'your team'. Anyway, Python has a type repository for popular libraries, just like TypeScript does. And mypy can still typecheck your code even without type annotations.
Re:Diminishing returns of static typing by sidlls on Monday October 02, 2017 @04:04PM (#15387436)
In fairness the hints available in Python 3 aren't really a static typing system. It would take a lot of extra work to make it one.
Re:Diminishing returns of static typing by lomnakkus on Monday October 02, 2017 @05:09PM (#15387974)
Well, nothing except almost the whole ecosystem of libraries not having type annotations, those type annotations that exist themselves being quite limited (IIRC), etc. etc.?

Can we stop pretending that adding type annotations to a 'dynamic' language solves the "good static typing" problem? It's just silly.

(About as silly as pretending that static types solve all problems.)