Re: Visitor pattern w/ separate iterator (like fold) need ideas

Chris F Clark <cfc@shell01.TheWorld.com>
12 Apr 2006 22:47:44 -0400

          From comp.compilers

Related articles
Visitor pattern w/ separate iterator (like fold) need ideas cfc@shell01.TheWorld.com (Chris F Clark) (2006-04-08)
Re: Visitor pattern w/ separate iterator (like fold) need ideas vesa.karvonen@cs.helsinki.fi (Vesa Karvonen) (2006-04-09)
RE: Visitor pattern w/ separate iterator (like fold) need ideas Ralf.Lammel@microsoft.com (Ralf Lammel) (2006-04-10)
Re: Visitor pattern w/ separate iterator (like fold) need ideas googlegroups@reillyhayes.com (Reilly) (2006-04-12)
Re: Visitor pattern w/ separate iterator (like fold) need ideas cfc@shell01.TheWorld.com (Chris F Clark) (2006-04-12)
| List of all articles for this month |

From: Chris F Clark <cfc@shell01.TheWorld.com>
Newsgroups: comp.compilers,comp.lang.functional
Date: 12 Apr 2006 22:47:44 -0400
Organization: The World Public Access UNIX, Brookline, MA
References: 06-04-051 06-04-066 06-04-074
Keywords: functional

In comp.lang.functional, I <cfc@shell01.theworld.com> wrote:
> So, I am soliciting suggestions on how to improve this model.
> Including ones like read the XYZZY book or article.


Vesa Karvonen replied:
> Since you asked, cursory reading of your article reminded me of an
> article by Jeremy Gibbons discussed (and linked to) here:
>
> Design Patterns as Higher-Order Datatype-Generic Programs
> http://lambda-the-ultimate.org/node/1360


and Ralf Laemmel replied:
> I recommend looking into Joost Visser's work on visitor combinators [1],
> more generally into strategic programming, where traversal strategies
> are programmer-definable abstractions that are derived from single
> primitives such as traversal of immediate children; there is a lot of
> related work on Eelco Visser's, Joost Visser's and my web sites, but I
> refer to [2] most specifically because it describes the notion of
> strategic programming with some useful reference to OO programming, and
> it also refers to adaptive programming, which is something you as well
> could want to review for the purposes of your design.
>
> [1] http://doi.acm.org/10.1145/504282.504302
>
> [2] http://doi.acm.org/10.1145/643603.643621


Thank you both! These are exactly the kinds of references I was
looking for. One quickly learns that when one comes up with an idea
that there are others that have had the same or similar ideas. I have
read these references quickly and can already see that they will
influence my perspective on the problem. Having combinator
(functions) that allow one to combine traversals and visitors will
certainly extend the reach of the model.


------------------------------------------------------------------------


As an aside to Ralf's longer comment/question which I didn't quote, I
can see your point of eliminating the state. That does simplify some
things (and is certainly appropriate from an FP perspective, as state
is an implementation artifact). My exposure of the state was simply
my all-too-imperative-background.


Again, thanks for the insights, my world has improved,
-Chris


*****************************************************************************
Chris Clark Internet : compres@world.std.com
Compiler Resources, Inc. Web Site : http://world.std.com/~compres
23 Bailey Rd voice : (508) 435-5016
Berlin, MA 01503 USA fax : (978) 838-0263 (24 hours)


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.