top | item 24426140

(no title)

duutfhhh | 5 years ago

I see classes as nodes in the power grid that transmits and transforms data instead of electricity. These nodes are wired up to other nodes via methods - their binding points. To be precise, a class is more like a spec that can be used to build an instance of that node. In some cases there's only one instance.

The main advantage of classes, I think, is that they define one underlying principle for all these data transformer nodes: that each node has a few binding points with certain interface: named methods. The nodes don't have to look this way, but restricting the freedom of design choices to this pattern makes it easier to compose many nodes together. It's like setting the expectation that all cars are squarish: it's easier to build the infra around cars when you know how they can look in general.

discuss

order

No comments yet.