I know executables might be the right name now, but it always has the long standing meaning of binary executables which might get you confused when reading the method name.

I can see your point about mixing this up with binary executables, but OTOH I'd expect people to get more and more used to applying the term to methods/constructors, given that it is also used in the JDK 8 with that meaning. The JavaDoc further clarifies forExecutables()'s purpose.

If we rename the API we really should rename the whole feature and call it "Executable validation". Do we want to go this far?

Hmmm, I think this would be indeed a step too far.

IMO the general concept and its manifestation in method/type identifiers don't have to match 100%. In some cases we speak about "method and constructor constraints" anyways, and in section 4.5 we also explicitly say "the term "method constraint" refers to constraints declared on methods as well as constructors." So I think we don't have to adapt the spec wording, but IMO using the correct method/type names would be beneficial for the consistency of the API (which is what most users work with).

--Gunnar



2013/1/8 Hardy Ferentschik <hardy@hibernate.org>
I have to back up Emmanuel here. 'forMethods' resonates much better and I think that just reading this method name
users would have a better idea on what this is about compared to ' forExecutables'. I know executables might be the
right name now, but it always has the long standing meaning of binary executables which might get you confused when
reading the method name.

I have another issue with the renaming. As you know by now I am a big fan consistency, but how far do we want to take it?
If we rename the API we really should rename the whole feature and call it "Executable validation". Do we want to go this far?
My gut feeling is no in which case I would also recommend to stick to 'Validator#forMethods()' in the API.

--Hardy



On 4 Jan 2013, at 11:31 AM, Emmanuel Bernard <emmanuel@hibernate.org> wrote:

> I like forMethods because it resonates faster on people's mind. But I
> can live and get forExecutables grow on me. So I'm neutral.
>
> Emmanuel
>
> On Fri 2013-01-04 11:05, Gunnar Morling wrote:
>> Hi all,
>>
>> While working on the TCK, I came across our new method
>> Validator#forMethods() which allows to validate method and constructor
>> parameters/return values.
>>
>> Given that we introduced the term "executable" when referring to both
>> methods and constructors, I wondered whether the method should better be
>> named "forExecutables()".
>>
>> Thoughts?
>>
>> --Gunnar
>
>> _______________________________________________
>> beanvalidation-dev mailing list
>> beanvalidation-dev@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>
> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev


_______________________________________________
beanvalidation-dev mailing list
beanvalidation-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/beanvalidation-dev