void methods should not modify their arguments. When you have return
value it is more clear that the method is doing some transformation on
given argument.
On 3/10/2010 9:30 PM, Simone Busoli wrote:
Wouldn't removing the return value give you enough control? Returning
from the method is just a way to do something not intuitive that you
can already do with the InterceptorReferenceCollection passed as the
argument to the method.
Would you know without looking at the code what happens to the
component interceptors if you return a single interceptor from the
method and it already had some in its own InterceptorReferenceCollection?
I'm for removing the return value and modifying the collection, tell
don't ask.
2010/3/10 Krzysztof Koźmic <[email protected]
<mailto:[email protected]>>
Finally, I'd suggest to make the SelectInterceptors contract
clearer. Either modify the model.Interceptors collection or
return something from the method, not both because it's hard
to figure out where your interceptors end up WRT order, which
is important.
I have no problem with that. The method has very general contract
and generally if you implement this interface you want to have as
much control as possible. I would leave it as is, especially that
we're using this pattern in few other places as well.
--
You received this message because you are subscribed to the Google
Groups "Castle Project Users" group.
To post to this group, send email to
[email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Castle
Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.