On Thu, Aug 18, 2016 at 11:28 PM, Denis Kudriashov <[email protected]>
wrote:

>
> 2016-08-18 13:32 GMT+02:00 stepharo <[email protected]>:
>
>> withExtension: aString
>>
>>     "Returns a new file reference with a different file extension"
>
>
> Does this comment is really needed?
> I only see extra word "different". And rest is same as method name. IMHO
> we should rename method to "withDifferentExtension:" and remove comment.
>

I think that it is interesting that the comment also says that it will
return a FileReference... of course there are other ways to know that, but
it is nice that the comment avoids the research/guessing.
More over, which is not obvious is that it will *change* the extension,
because the "with" prefix could mislead you to think that it will *add* the
extension. Maybe we can come up with a better name (withDifferentExtension:
works better, I agree) or we need the comment to be explicit about it.

Reply via email to