From: Henning von Rosen Date: 2002-01-09T21:13:23+09:00 Subject: "Visitor" should be "Iterator" in Programming Ruby? """The Visitor Pattern It's the method each. """ I came to mention the above chapter in Programming Ruby, in a letter to Thomas K�hne, the author of "A Functional Pattern System for Object-Oriented Design". BTW, this is a very well written and interesting book, also from a Ruby language design perspective. It also gives a brief presentation of the FP resp OO concepts pros-and-cons in the beginning. http://www-agce.informatik.uni-kl.de/~kuehne/fps/ >> Reading about the issue of less-lang-support->more-pattern-relevance, I came >> to think of a passage from one of the Ruby books. A chapter treats >> implementations of some well-known patterns. The whole text of the >> subchapter on The Visitior Pattern, is "It's the method each.". [Thomas K�hne]>I find that hard to believe. >With regard to the "Iterator Pattern" the answer would be "its the method >each", but there is an element of double dispatch in visitor, which I don't >think is supported by Ruby as a language mechanism and anyway it would >be more than just the method "each". Cheers, Henning