I'm trying to "port" the Dijkstra example to both my Ruby implementation and Marvin. They are functionally equal so the challenges should be the same.
One thing I'm struggling with is the map and node roles used.
In the shortest path context an object is bound to the map role and to each of the elements of one of the properties of that object another role is bound to each of these.
From an implementation point of view I can see the convenience of this approach but it also feels like a role having roles.
Is it DCI to be able to not only bind roles to an object but to bind the same role to an arbitrary number of objects in a collection (potentially a collection that's an attribute of another RolePlayer)
I have so far personally used a different approach to this, actually two different approaches. Either binding the collection as a role and hiding the enumeration details (See Subgraph in the Marvin Dijkstra example) or having each object in the collection be a context with each element from the original collecting being bound to a role in it's own context
-Rune