Hacker News new | ask | show | jobs
Ask HN: Recommend Reading on Classes vs. Functions
2 points by ilmoi 1716 days ago
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?

1 comments

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.