Skip to content

Reduce R6 boilerplate and add $ prefix to methods title#1814

Closed
hadley wants to merge 2 commits into
mainfrom
drop-r6-headings
Closed

Reduce R6 boilerplate and add $ prefix to methods title#1814
hadley wants to merge 2 commits into
mainfrom
drop-r6-headings

Conversation

@hadley
Copy link
Copy Markdown
Member

@hadley hadley commented Mar 17, 2026

Fixes #1153. Fixes #1258.

@gaborcsardi I filed the original issue. What do you think?

@hadley hadley requested a review from gaborcsardi March 17, 2026 14:13
@hadley hadley changed the title Reduce R6 boilerplate Reduce R6 boilerplate and add $ prefix to methods title Mar 17, 2026
Copy link
Copy Markdown
Member

@gaborcsardi gaborcsardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My main worry with these kind of things in general is that it generates a lot of small differences in the output, that people will need (?) to look at, and I am not entirely sure if the output being a bit better justifies the extra work.

But again, this is not a very strong opinion...

Comment thread R/rd-r6-methods-self.R
usage <- format(function_usage(fake, x$formals))
push_subsection(
"Usage",
push(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like these sections because R users are familiar with them already, and they introduce more structure. The same with the 'Method' prefix. I think it is ok to make the docs more verbose if it helps discovery and reduces ambiguity. I agree that the boilerplate can be very repetitive, but I think for a reference manual that is ok. (Not for a tutorial otoh.)

But this is somewhat subjective, and I don't have a very strong opinion about these changes, so feel free to go ahead with them.

@hadley
Copy link
Copy Markdown
Member Author

hadley commented Mar 17, 2026

@gaborcsardi FWIW there are going to be a bunch of minor changes in this release, so I think it'll be ok.

@hadley
Copy link
Copy Markdown
Member Author

hadley commented Mar 18, 2026

Yeah, looking at this again, it feels a bit too minimal to me. Lets keep brainstorming in #1815.

@hadley hadley closed this Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

R6 methods shouldn't have crossreferences to base functions of the same name Reduce boilerplate in R6 method docs

2 participants