|recursive iterators email@example.com (2002-03-09)|
|Re: recursive iterators firstname.lastname@example.org (Randall Hyde) (2002-03-19)|
|Re: recursive iterators email@example.com (Ray Dillinger) (2002-03-21)|
|Re: recursive iterators firstname.lastname@example.org (2002-03-31)|
|Re: recursive iterators email@example.com (Randall Hyde) (2002-04-06)|
|From:||Ray Dillinger <firstname.lastname@example.org>|
|Date:||21 Mar 2002 22:02:50 -0500|
|Posted-Date:||21 Mar 2002 22:02:50 EST|
Alex Colvin wrote:
> Are there any languages, especially C derivatives, with extensible control
> structures. C++ seems to have gone overboard with data-structure
> extensions, but (aside from exceptions, to which I take,) left control
> To be (lightly) more specific, I have a program where I walk tree
> structures recursively, generating elements of a sequence. The program
> does several of these walks at once, doing different things with the
> Any thoughts? Is this straightforward in some popular language? Am I just
> thinking incorrectly?
Well, scheme makes the job you describe extremely straightforward.
You can pass procedures, closures, and continuations around, store
them in data structures, build executable code from data on the fly,
whatever. Since scheme allows both "up" and "down" continuations
(ie, the stack is saved with the continuation so you can return
from procedures more or less often than you call them) and allows
continuations to be stored as values in variables, you can
literally implement whatever control structure you can imagine in
a straightforward way. It's *NOTHING* like C, though.
[It's pretty easy in perl, too. -John]
Return to the
Search the comp.compilers archives again.