Hacker News new | ask | show | jobs
by davorak 1059 days ago
"But when I talk about modularity I mean a style of programming in which the internal details of an object both its data and its code are sealed off from the code outside that object. And to communicate with an object you have to use precisely defined ways into and out of that object. In some languages those ways into and out may be declared as interfaces. To an object-oriented language like Smalltalk the interfaces to an object are provided by methods that respond to messages."

That definition seems to put the cart before the house. Techniques like "details of an object both its data and its code are sealed off" are used to obtain/produce modularity.

Video puts several disclaimers before giving that definition but it was shared at the end of the video like you a conclusion so I can see some viewers walking away with conflicting conclusions from the video.

Both wikipedia[1] and Cambridge Dictionary[2] have better more general definitions for modularity.

[1] https://en.wikipedia.org/wiki/Modularity

[2] https://dictionary.cambridge.org/dictionary/english/modulari...