cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Gallardo" <agalla...@agssa.net>
Subject Re: cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/binding RepeaterJXPathBinding.java
Date Thu, 04 Mar 2004 11:12:48 GMT
In fact we can call it:


isValidKey(...)     <--- I prefer this one over the below name.
isValidUniqueRowId(...)

The other names are too specific to what the function do. Sometimes it is
good to call the functions by what solve and not by how is the internal
implementation (using List, Set or whatever).

WDYT?

Best Regards,

Antonio Gallardo.


Joerg Heinicke dijo:
> On 04.03.2004 09:31, Sylvain Wallez wrote:
>
>>>>  changed isNullAllListElements() => isAnyListElementNotNull(): the
>>>> duplicate negation at usage time breaks my brain ;-)
>>>
>>> This depends of the POV you see it:
>>>
>>> isNullAllListElements() -> This is not a negation. It check if :
>>>
>>> All elements on the List are null. Where is the negation?
>>>
>>> isAnyListElementNotNull() -> Here is a negation "Not null"  :-D
>
> Hmm, that's true. But what I meant was the usage of
> !isNullAllListElements and ListElement != null inside the function.
>
> What you are really testing for is the availableness/usability of the
> list for unique identification. So the function itself should not return
> true if it only contains nulls.
>
>> Generally speaking, negative forms should be avoided, as their
>> interpretation may be difficult depending on people's linguistic
>> background. I used to work with Japanese people long time ago, and I'm
>> sure this name, even with a single negation, would be very hard for them
>> to understand.
>>
>> So what about "hasNonNullElements()"?
>
> Yes, this might be more obvious/understandable than "any" and "not" in
> my version.
>
> Joerg
>


Mime
View raw message