News for hackers. Stuff that matters.
Re:Mindset Shifts for Functional Programming by chriswarbo on Wednesday April 05, 2023 @11:17AM (#35455653)
Your implementation has lost the encapsulation of mine, and broken the call-graph relationships. For example:

- Updates and bug-fixes to the `isOdd` function will not be inherited by your `isEven` function.

- If I set a breakpoint in this function, it won't get triggered when I call `isOdd`.

- Your `isEven` function requires an implementation of `!`

- etc.

Re:Mindset Shifts for Functional Programming by twic on Wednesday April 05, 2023 @04:56PM (#35460268)
> - Updates and bug-fixes to the `isOdd` function will not be inherited by your `isEven` function.

> - If I set a breakpoint in this function, it won't get triggered when I call `isOdd`.

    boolean isOdd(int n) {
      return !isEven(n);
    }
> - Your `isEven` function requires an implementation of `!`

Yes, but this language has one, so that's fine.