Hi,

I've just updated from 2.0 M4 to M6 and noticed that quite some methods have 
been renamed, especially getters and setters of boolean field values.

For example in class
org.restlet.engine.application.Encoder
setEncodeRequest(boolean) has been renamed to setEncodingRequest(boolean)

I have to say, that the new name sounds somewhat strange and misleading to me.
When I read "Encoding", I first think of the noun.

So, "setEncodingRequest" makes me first think of "set the encoding of the 
request" and I wonder, why hasn't this been named "setRequestEncoding()".
It's only when I see the boolean parameter and the corresponding 
isEncodingRequest() function, that I get the logic of this:
"Encoding" is to be read as a verb: isEncodingRequest() - "Is [the Encoder] 
encoding [the] Request".

I have to say, that the old name and the use of the imperative verb form 
("Encode [the] Request!") seemed more natural to me:
"setEncodeRequest()".

According to the changeset
http://restlet.tigris.org/source/browse/restlet?view=rev&revision=5644
there is also for example:
org.restlet.routing.Variable
setEncodedOnFormat() -> setEncodingOnFormat()
or
org.restlet.routing.TemplateRoute
setMatchQuery() -> setMatchingQuery() (possibly confused with a meaning of "set 
the matching query (the query that matches)" instead of "tell the route to 
match the query")


Of course this is a minor matter and is probably also a matter of taste, but 
maybe others agree on this, and the change can be rethought over (at least for 
cases where the -ing verb can be confused with a noun).

Cheers,
Carsten

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2430441

Reply via email to