Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Recommend Reading on Classes vs. Functions
2 points by ilmoi on Oct 2, 2021 | hide | past | favorite | 3 comments
I'm struggling to draw a clear line in my head on when to use classes vs pure functions. I get the positives of having your functionality grouped and together in the class-based approach, but in recent projects I've been really burned by painful inheritance/mixins problems. So now I'm questioning if I should have gone pure functions all the way.

Could someone recommend some good articles / books / tutorials that touch on this topic?




this is actually awesome, thanks so much for sharing


You are welcome. There are a couple of books (editions) by Brett Slatkin titled "Effective Python: [59|90] Specific Ways to Write Better Python". 59 for the first edition, 90 for the second. There's also a video course.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: