Topic on Talk:Requests for comment/TitleValue

Tim Starling (talkcontribs)

I think method names that start with a preposition are usually ambiguous and should be avoided. I think that this principle applies in this case, and I think that this method name should start with a verb, such as "create".

Duesentrieb (talkcontribs)

how about "deriveSectionTitle"?

Tim Starling (talkcontribs)

That's not what "derive" means. I would prefer something more verbose like createTitleWithSection(), it's hard to be briefer than that without coining jargon.

Duesentrieb (talkcontribs)

createTitleWithSection() doesn't convey the fact that the new object will use the original object's page name, only replacing the section part. That's why I thought "derive" would fit: "Spam#Foo" is derived from "Spam#Bar" by changing the section.

Reply to "withSection"