> Also, there seems to be little utility in creating the directionality enum - 
> the only reason to do so would, in my opinion, be within the context of a 
> traversal policy, something that appeared to be very controversial.  I can't 
> but notice how the example you gave tries to solve the same problem the 
> traversal policy would solve.

My example doesn't solve anything, it merely shows that encoding a
method parameter in six different versions of the same method doesn't
compose well, and has worse ergonomics than just encoding the
parameter as an actual parameter.

The reasons I gave are:
1. You can't switch() on a method reference, therefore applications
that want to use the new API and abstract over it will have to
re-invent the enum anyways.
2. You can't modify the control flow by selecting a different parameter.

I don't want to discuss the traversal policy proposal here, I am only
commenting on the API that you propose. There is no precedent in
JavaFX for providing six different methods for what is essentially a
parameter.

Reply via email to