Skip to content

Comment on Classes often aren't the simplest tool for the job

Comments

I only ever use classes to avoid global variables (mostly when using matplotlib animation)

And even then I usually try to make a function of a function whenever possible.

I find classes really hard to grasp (multiple inheritance/the syntax often sucks/diamond gotchas). Maybe I just don't understand them, but I've been able to get away without understanding classes for long enough

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.