From: Paul Brannan Date: 2002-02-14T01:26:36+09:00 Subject: Re: qualms about respond_to? idiom On Thu, Feb 14, 2002 at 01:11:39AM +0900, Dave Thomas wrote: > start tags would have > > def handle_stack(stack) > stack.push(name) > end Does this really belong in the stream object itself? Should a tag have to have knowledge of how the data structure it is being put into operates? What if I wanted to create a binary tree of tags and other stream elements; should I then have a handle_binary_tree method in all my stream objects? Using your solution seems nice, since it means that the dispatcher needs less knowledge about the objects it is handling, but it means that the objects need more knowledge about the dispatcher. Is there a good way around this tradeoff? Paul