Hi Johan: we seem to have different programming cultures in the AP community. I am in the multi-visitor group. How would you do Mitch's recursion-with-traversal example /proj/adaptive/www/course/f97/hw/2/capacity-with-stack with less than three visitors? I think you lose some modularity. For example, I can easily plug in another InitialVisitor which stores the inital sum in the container. If you use one visitor you get more tangling as shown in /proj/adaptive/www/course/f97/hw/2/capacity-with-stack/statistics.beh (I tried it out.) > Broadcast Q: has anyone ever traversed the > internal structure of a visitor? I do. Also see the above program. >From johan@ccs.neu.edu Fri Oct 3 14:52:55 1997 >From: Johan Ovlinger >To: lieber@ccs.neu.edu >CC: dem@ccs.neu.edu, ldodds@ccs.neu.edu >Subject: Re: one visitor adaptive methods >Status: R > >I never use mulitple visitors. I have yet to come across a situation >where the separation of concerns seemed natural enough to justify >retyping all the cruft. I guess I am loosing some reuse, but some justification here>. > >So, are we leaning back towards keeping visitors in the class graph >again? I would argue that they don't really belong there, being more >behavior than structure. Broadcast Q: has anyone ever traversed the >internal structure of a visitor? Not I, anyway. In addition, I am >uncomfortable with this style of automatic behavior. Adding a part to >a visitor shouldn't influence the behavior of the rest of the visitor. > >While I argue that multiple Visitors in a traversal is useless, I have >come across situations (singular actually) where I had one visitor >nested inside another. The outer visitor selectively called or >refrained from calling the interior's wrappers. The situation where >this was useful could easily be replaced by naming strategy segments, >which I think is a nicer solution anyway. Naming strategy segments is definitely useful but it appears to orthogonal to the multiple visitor issue. What kind of facilities would you like to have to name strategy segments? We should have a discussion of this. > >Johan > -- Karl