Hacker News new | past | comments | ask | show | jobs | submit login

Alright, let's take it for a spin. What do you call the thing that you're forwarding to? The endpoint? The "nextLinkInChain"? Delegate seems pretty natural to me in most domains, but as you say, I've been poisoned by GoF.



I'm planning to follow up in another post, but Gunther Kniesel coined the term "consultation" (http://javalab.cs.uni-bonn.de/research/darwin/delegation.htm...) and I've used a generic "attendant" term to refer to the other object.

Here's an excerpt from my take on the 2 characteristics of consultation (or what is typically called "delegation") in my book

---- The first is the connascence of method names between collaborating objects. Connascence refers to the point and type of coupling between objects where a change in one object requires a change in the other. Consultation occurs when the message recipient forwards a message to another object which handles the response to the same message. A calculator would receive a balance message and forward that message to an account which responds to balance. Rails’ implementation of delegate does include a caveat that the message might be prefixed before it is forwarded, but the implementation is still connascent by method name. The second aspect of consultation is that the message recipient makes no modifications to the algorithm for handling the response. ----

I wrote to Lieberman to ask his opinion and he sided with NOT introducing the "consultation" term. But his reason was not because our misguided understanding of delegation is correct, his reason was because we already have a name for this: forwarding. The quote above is from my argument about why I think it is valuable to use the term "consultation".




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

Search: