Hi,

Indeed, DeepTraverser is the project to look at. I started it from the code of Mariano, and then Stefan Rechhart reimplemented it from scratch to make it very fast (e.g. traversing subclasses of a class is only 10% slower than the hard coded withAllSubclassesDo:) and to make it work like a stream. It's really beautiful.

Cheers,
Doru

--
www.tudorgirba.com

"Every thing has its own flow"

On 22 Dec 2015, at 14:06, Mariano Martinez Peck <marianopeck@gmail.com> wrote:

Denis,

The DeepTraverser was a little easy hack I shared years ago to Tudor Girba which he then (improved it?) put it in Moose.
While it works is still very limited. You can give it a try. And if not, please spend some time checking the graph traverser we have in Fuel. I suspect it could be easily adapted for custom code, but I am not sure ;)

Basically, check FLAnalysis >> run, which has a stack and starts the trace via #mapAndTrace: 

Cheers,

On Tue, Dec 22, 2015 at 6:20 AM, Denis Kudriashov <dionisiydk@gmail.com> wrote:

2015-12-22 10:05 GMT+01:00 Marcus Denker <marcus.denker@inria.fr>:

> On 22 Dec 2015, at 09:46, Denis Kudriashov <dionisiydk@gmail.com> wrote:
>
> Hello.
>
> Do we have way to traverse object graph?
>
> I want stream which iterate object graph through instance variables with knowledge about path at every step.
>
> Maybe Fuel has classes for this ?
>

yes, I think so.. there is #fuelAccept:, but I am not sure how general it is.

I remember that Doru did some object graph iteration experiments, too?
(I can���t find it).

But I think we should actually add a general ���object graph iterator��� to the reflective
features of the language. It seems very useful to have, and for sure Fuel could just
use it.

        Marcus








--