[ 
https://issues.apache.org/jira/browse/TINKERPOP-3028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17852972#comment-17852972
 ] 

ASF GitHub Bot commented on TINKERPOP-3028:
-------------------------------------------

Cole-Greer commented on code in PR #2640:
URL: https://github.com/apache/tinkerpop/pull/2640#discussion_r1630462255


##########
docs/src/upgrade/release-4.x.x.asciidoc:
##########
@@ -118,11 +118,41 @@ passes lists with no elements matching the predicate.
 Integer overflows caused by addition and multiplication operations will throw 
an exception instead of being silently
 skipped with incorrect result.
 
+==== SeedStrategy Construction
+
+The `SeedStrategy` public constructor has been removed for Java and has been 
replaced by the builder pattern common
+to all strategies. This change was made to ensure that the `SeedStrategy` 
could be constructed in a consistent manner.
+
 ==== Removal of `gremlin-archetype`
 
 `gremlin-archetype`, which contained example projects demonstrating the use 
cases of TinkerPop, has been removed in
 favor of newer sample applications which can be found in each GLV's `examples` 
folder.
 
+==== Improved Translators
+
+The various Java `Translator` implementations allowing conversion of Gremlin 
traversals to string forms in various
+languages have been modified considerably. First, they have been moved from to 
the
+`org.apache.tinkerpop.gremlin.language.translator` package, because they now 
depend on the ANTLR grammar in
+`gremlin-language` to handled the translation process. Making this change 
allowed for a more accurate translation of
+Gremlin that doesn't need to rely on reflection and positional arguments to 
determine which step was intended for use.
+
+Another important change was the introduction of specific translators for 
Groovy and Java. While Groovy translation
+tends to work for most Java cases, there is syntax specific to Groovy where it 
does not. With a specific Java
+translator, the translation process can be more accurate and less error prone.
+
+The syntax for the translators has simplified as well. The translator function 
now takes a Gremlin string and a target
+language to translate to. Consider the following example:
+
+[source,text]
+----
+gremlin> GremlinTranslator.translate("g.V().out('knows')", Translator.GO)
+==>g.V().Out("knows")
+----
+
+Further note that Gremlin language variants produce `gremlin-language` 
compliant strings directly since bytecode was
+removed. As a result, all translators in .NET, Python, C# and Javascript have 
been removed.

Review Comment:
   ```suggestion
   removed. As a result, all translators in .NET, Python, Go and Javascript 
have been removed.
   ```





> Convert translators to make use of the grammar
> ----------------------------------------------
>
>                 Key: TINKERPOP-3028
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3028
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: translator
>    Affects Versions: 3.6.6
>            Reporter: Stephen Mallette
>            Assignee: Stephen Mallette
>            Priority: Major
>
> {{Translator}} infrastructure uses bytecode and reflection which has a number 
> of technical imperfections and exemptions for it to work properly. Switching 
> to the grammar for translation simplifies the code, removes friction and 
> complexity when generating GLV tests, and should perform better. The focus 
> for this issue is the Java series of translators which are relied on quite 
> heavily. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to