xiazcy commented on code in PR #3211:
URL: https://github.com/apache/tinkerpop/pull/3211#discussion_r2453536745
##########
docs/src/reference/gremlin-variants.asciidoc:
##########
@@ -1369,6 +1369,30 @@ java -cp target/run-examples-shaded.jar
examples.BasicGremlin
java -cp target/run-examples-shaded.jar examples.ModernTraversals
----
+[[gremlin-java-differences]]
+=== Differences
+
+Gremlin-Java provides additional syntactic sugar that leverages Java's type
system. Most notably, the `P.typeOf()`
+predicate accepts Java `Class` objects directly, providing a more natural and
type-safe way to perform type checking:
+
+[source,java]
+----
+// Java-specific syntax using Class objects
+g.V().values("age").is(P.typeOf(Integer.class))
+g.V().values("name").is(P.typeOf(String.class))
+g.V().has("weight", P.typeOf(Double.class))
+----
+
+This is equivalent to using `GType` enums, but offers compile-time type
checking and IDE support. Other Gremlin
Review Comment:
Removed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]