Do you think we should support the following?
similar to having property level and class level constraints, we could get method level constraints receiving all the parameters and raising constraints violations if necessary.
I like 2b but... I don't think Java can properly model this in a type-safe way. I know Ceylon can but afaik that's the only language that can.
In other words nothing will prevent someone from writing the wrong signature.
1. can be built atop 2.a. And regardless, I think we should offer 2.a.
I guess what we could do is have the interface be 2.a. and allow other isValid methods (a la 2.b) and call them upon matching. Not sure I like that but that should be explored.
How can cross-parameter constraints be distinguished from return value constraints?
Yes I agree that's an issue but I don't see a nice way out
+1 for 2a
@ParameterAssert might be a nice solution in case we want to keep this more open for now.
For the draft of october let's put in the generic solution.
We can still continue to discuss the other options after.