You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2015/10/09 21:22:05 UTC

[jira] [Created] (TINKERPOP3-882) Developer a less error prone way for rewriting stratgies

Marko A. Rodriguez created TINKERPOP3-882:
---------------------------------------------

             Summary: Developer a less error prone way for rewriting stratgies
                 Key: TINKERPOP3-882
                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-882
             Project: TinkerPop 3
          Issue Type: Improvement
          Components: process
            Reporter: Marko A. Rodriguez
            Assignee: Marko A. Rodriguez


When someone writes a {{TraversalStrategy}} it is of the nature:

{code}
if(step instanceof SelectStep && ((SelectStep)step).getLocalChildren().size() > 1) {
  TraversalHelper.insertStep(new IdentityStep(), step, traversal);
}
{code}

It can start to get hairy looking fast. It would be great if we could study the strategies we have thus far and see if there are patterns we can extract encapsulate such behaviors in new methods in {{TraversalHelper}}. I don't have any good ideas on how to do this, but I think we need it. My only thought was a "regular expression" language for our traversals so we can pattern match ON the traversal. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)