Hacker News new | past | comments | ask | show | jobs | submit login

Neat stuff. I've become a huge Python types fan. Even on small personal things, my flow is to write the empty classes, add attributes, add method signatures with hints, then fill in the methods. Leads to a lot less rewriting. Writing the hints doesn't take long at all.

What does take a long time is learning about it all. There's the docs, then PEP 484, then at least eight other related PEPs of various impact. It would be a good topic for a small book / website / course, except things change kinda fast.

I do think it could be a hack for a new dev to establish credibility. Spend a few months type hinting code and fixing bugs in popular open source repos. You'll learn way more about real software engineering than following another tutorial. If someone wants to do that and wants some mentoring, hit me up at my last name at gmail.




This is, in my opinion, the best way to design software. If you’d like to see what happens when you take it further with a more powerful type system, read type-driven development in Idris or any of the F# type-driven development blog posts.


I will upvote anyone who says my way of designing software is the best. And thanks for the suggestions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: