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

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

kenhuuu commented on code in PR #3195:
URL: https://github.com/apache/tinkerpop/pull/3195#discussion_r2325957490


##########
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/NotP.java:
##########
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.process.traversal;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+public class NotP<V> extends P<V> {
+    private P<V> originalP;

Review Comment:
   Something feels a bit off about this class. It both wraps P and extends P 
but it doesn't feel like either is completely needed in this case. It would 
probably be easier to understand if some changes were made to P itself. Other 
things that are confusing is that it leads to situations where negate() returns 
originalP which isn't immediately clear why that would be the case. If this 
isn't something that you want to address for this PR then just make a short 
javadoc for this class that has a quick explanation about its design and make a 
Jira for future refactoring.





> Simplify Comparability Semantics
> --------------------------------
>
>                 Key: TINKERPOP-3173
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3173
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.7.3
>            Reporter: Cole Greer
>            Priority: Major
>
> As recently discussed on the 
> [devlist|https://lists.apache.org/thread/hsqw2tvc72dw4z40nnbbdmygrqx43syr], 
> our current system of ternary boolean logic should be simplified to binary 
> boolean logic where invalid comparisons simply return false.



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

Reply via email to