[ https://issues.apache.org/jira/browse/TINKERPOP-2862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17816253#comment-17816253 ]
ASF GitHub Bot commented on TINKERPOP-2862: ------------------------------------------- vkagamlyk commented on code in PR #2483: URL: https://github.com/apache/tinkerpop/pull/2483#discussion_r1484897917 ########## docs/src/upgrade/release-4.x.x.asciidoc: ########## @@ -75,10 +75,43 @@ See: link:https://issues.apache.org/jira/browse/TINKERPOP-3017[TINKERPOP-3017] Starting from this version, `gremlin-javascript` will deserialize `Set` data into a ECMAScript 2015 Set. Previously, these were deserialized into arrays. +==== Gremlin Grammar Changes + +A number of changes have been introduce to the Gremlin grammar to help make it be more consistent and easier to use. + +*`new` keyword is now optional* + +The `new` keyword is now optional in all cases where it was previously used. Both of the following examples are now +valid syntax with the second being the preferred form going forward: + +[source,groovy] +---- +g.V().withStrategies(new SubgraphStrategy(vertices: __.hasLabel('person'))) + +g.V().withStrategies(SubgraphStrategy(vertices: __.hasLabel('person'))) +---- + +In a future version, it is likely that the `new` keyword will be removed entirely from the grammar. + +*Supports withoutStrategies()* + +The `withoutStrategies()` configuration step is now supported syntax for the grammar. While this option is not commonly +used it is still a part of the Gremlin language and there are times where it is helpful to have this fine grained +control over how a traversal works. + +[source,groovy] +---- +g.V().withoutStrategies(CountStrategy) Review Comment: does it make sense to add an overload that accepts string as argument? Might be useful for GLV's, like `withoutStrategies(SubgraphStrategy.class)` vs `withoutStrategies("SubgraphStrategy")` > A grammar in TinkerPop should accept withoutStrategies > ------------------------------------------------------ > > Key: TINKERPOP-2862 > URL: https://issues.apache.org/jira/browse/TINKERPOP-2862 > Project: TinkerPop > Issue Type: Improvement > Components: language > Affects Versions: 3.6.1, 3.5.4 > Reporter: Norio Akagi > Priority: Major > > In our Grammar, we have {{withStrategies}} but not {{{}withoutStrategies{}}}. > [https://github.com/apache/tinkerpop/blob/08afd4e475b56189500c31361b624ecc687e8b7b/gremlin-language/src/main/antlr4/Gremlin.g4#L65] > > We should support so that a caller can disable a specific TinkerPop optimizer > at will. Note that graph providers can have their own Strategy, which may be > out of scope of {{withoutStrategies.}} -- This message was sent by Atlassian Jira (v8.20.10#820010)