[ https://issues.apache.org/jira/browse/TINKERPOP-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17899215#comment-17899215 ]
ASF GitHub Bot commented on TINKERPOP-2959: ------------------------------------------- spmallette opened a new pull request, #2906: URL: https://github.com/apache/tinkerpop/pull/2906 Enums dont quite make sense as variables as you likely wouldn't do change something like Scope dynamically as it alters the whole intent of the traversal. In addition, technically enums can't be parameters because serialization doesn't support them - they are not supported types (T/Direction are the only exceptions but only because they are returned in query results from valueMap()/elementMap()). VOTE +1 > Allow the grammar to support parameters > --------------------------------------- > > Key: TINKERPOP-2959 > URL: https://issues.apache.org/jira/browse/TINKERPOP-2959 > Project: TinkerPop > Issue Type: Improvement > Components: language > Affects Versions: 3.6.4 > Reporter: Stephen Mallette > Assignee: Stephen Mallette > Priority: Major > Fix For: 3.7.0 > > > Allow the grammar to support parameters similar to how the groovy engine does > like, {{g.inject(x,y,z)}}. Doing this will make it easier for a transition > away from the groovy engine as a lot of Gremlin in the world today uses > parameters. The grammar may have to come with some limitations though as > groovy is wide open in terms of what can be treated as a variable. Probably > going to keep parameters tied to primitives, collections and tokens/enums > like {{Order}} and {{Scope}}. Collections themselves will not contain > parameters and things like a {{Traversal}} or {{P}} cannot be treated as one. -- This message was sent by Atlassian Jira (v8.20.10#820010)