News for hackers. Stuff that matters.
Re:The Gang of Four book is wrong about delegation (2012) by galaxyLogic on Thursday June 29, 2017 @03:48PM (#14666306)
That is probably because what he and we are talking about here is the technical definition of "delegation".

If you just call a method of another object and then that object perhaps but not necessarily sends some messages back to the original sender, to get further information, that could conceptually be seen as "delegation". But technically that's just normal (bi-directional) message-exchange.

"Delegation" needs to refer to something more technically specific to warrant its existence as a technical concept.

Re:The Gang of Four book is wrong about delegation (2012) by josteink on Thursday June 29, 2017 @04:02PM (#14666403)
For languages which didn't have function-pointers as a first-class construct (like Java), you had to create another way to delegate functions between different objects. A way to encapsulate them, if you like.

It may not seem novel now, but it was not obvious to everyone at that time that this was a possible design-pattern.