Github user jorgebay commented on a diff in the pull request:
    --- Diff: gremlin-dotnet/glv/generate.groovy ---
    @@ -48,7 +48,7 @@ def toCSharpTypeMap = ["Long": "long",
                            "TraversalMetrics": "E2",
                            "Traversal": "ITraversal",
                            "Traversal[]": "ITraversal[]",
    -                       "Predicate": "TraversalPredicate",
    +                       "Predicate": "object",
    --- End diff --
    Sorry, I've read it a while back when the pull request was first opened and 
forgot about it :/
    There are several consequences of using an untyped API for those methods:
    - We are stuck maintaining an API for which we can't predict how its being 
used (specially considering that db providers might support additional 
functionality on top of the GLV).
    - The user looses compile time checks.
    - It will be hard for the user to find the correct expected type (`Lambda`) 
and the error message on serialization might be unclear.
    I think we should avoid using `object` for predicates.
    We could use different workarounds for the `T` issue you highlighted above:
    - Use a class for `T` (not an enum), properties like `T.Id` could return 
instances of whatever interface we create for it. Given that java enums 
functionality is more comprehensive than what C# currently supports, it makes 
sense to use a class IMO.
    - Generate the offending traversal methods manually.


Reply via email to