iiroki commented on a change in pull request #1553:
URL: https://github.com/apache/groovy/pull/1553#discussion_r611153196



##########
File path: src/main/java/org/codehaus/groovy/ast/expr/RangeExpression.java
##########
@@ -64,10 +80,20 @@ public boolean isInclusive() {
         return inclusive;
     }
 
+    public boolean isExclusiveLeft() {
+        return exclusiveLeft;
+    }
+
+    public boolean isExclusiveRight() {
+        return exclusiveRight;
+    }
+
     @Override

Review comment:
       On second thought, "exclusive" keyword is widely used elsewhere, so 
keeping the names as they are now would keep things more consistent.

##########
File path: src/main/java/org/codehaus/groovy/ast/expr/RangeExpression.java
##########
@@ -64,10 +80,20 @@ public boolean isInclusive() {
         return inclusive;
     }
 
+    public boolean isExclusiveLeft() {
+        return exclusiveLeft;
+    }
+
+    public boolean isExclusiveRight() {
+        return exclusiveRight;
+    }
+
     @Override

Review comment:
       I agree that it would be clearer to use "open" keyword instead of 
"exclusive". `isOpenLeft` and `isOpenRight` are more similiar to each other 
than `isLeftOpen` and `isRightOpen` so it think it would be better to go with 
that way. IDE autocompletion will also benefit from this, e.g. writing 
`isOpen...` will pop up both.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to