HackerTube 中文?

Stop Writing Classes

Next Day VideoYouTube ↗

Further reading 1

Caption notes

At PyCon US 2012, Jack Diederich uses a greeting object to show how he decides whether a Python class earns its place. If initialization only saves an argument and the object is created for a single method call, he considers using a function for the job. He gives a heap as a counterexample: a class can group several operations around the same mutable data. In the Q&A, an audience member points out that library callers may need to inspect a stored argument. Diederich acknowledges that simplification can go too far.

Archived captions (transcription method unspecified) ↗
Original passages · 2
you should have just written a function
Stop Writing Classes · ▶ 3:12–3:23
a bundle of mutable data and a bunch of related functions
Stop Writing Classes · ▶ 12:59–13:10

Hacker News comments

View original on HN ↗