julianhyde commented on code in PR #3635:
URL: https://github.com/apache/calcite/pull/3635#discussion_r1488264229


##########
core/src/main/java/org/apache/calcite/rex/RexUtil.java:
##########
@@ -1683,7 +1683,7 @@ public static boolean isLosslessCast(RexNode node) {
    *
    * @param source source type
    * @param target target type
-   * @return true iff the conversion is a loss-less cast
+   * @return true if the conversion is a loss-less cast

Review Comment:
   I don't think this edit improves clarity. There's an equivalent method a few 
lines away, and the javadoc is now inconsistent.
   
   In general I will write 'Returns whether xxx' because though people write 
'Returns true if xxx' they really mean 'Returns true if xxx and false 
otherwise'. I would make an exception for methods that flirt with the for the 
*Entscheidungsproblem*, such as the following:
   ```
      /** Returns true if x is positive. */
     boolean isPositive(int x) {
       while (x < 0) {
         continue;
       }
       return true;
     }
   ```



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

Reply via email to