Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

1. You don't want components with encapsulated state at every level of your system.

2. Where you do want them, like at coarser service boundaries, virtually all general purpose languages have modules of some sort.



1. Sure, most system are not made purely out of functions or purely out of objects.

2. If a module has state, is it not named with a noun, is not an object even if we try calling it an entity, an actor, or anything else?


> If a module has state, is it not named with a noun, is not an object even if we try calling it an entity, an actor, or anything else?

But we're talking about OOP, which is characterized by specific logical properties surrounding modelling, encapsulation and extension, not about colloquial terms like "objects" that are referred to by nouns.

Conflating colloquial language with the programming language is one of many reasons why OOP seems seductive but is often misleading.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: