3 ms·
It's called message passing. It used to be part of the commonly accepted definition of OO.
by brlewis 18y ago
It's called message passing. It used to be part of the commonly accepted definition of OO.
- axod 18y agoSure. I still think it's ugly though. It reminds me a lot of an old coworkers code. He decided to simply expose one method to his subsystem - .execute(String what, String[] args) Then you would pass in strings to specify what you wanted it to do. It made my brain hurt for weeks.
- olavk 18y agoI don't see how it is more like message passing than an ordinary method call? Only difference AFAICT is that since JS don't support "catch-alls" (yet), you can't handle missing methods at the receiver. But that does not seem to be relevant here.