Skip to content

Why have the design-pattern function() with the body function_impl(), defined elsewhere? #529

Description

@jdhoffa

For example, in the file scale_colour_r2dii.R, there is a function defined as r2dii_pal, that has an abort call and a body of r2dii_pal_impl that is defined in a different file utils.R.

What are the pros to doing this?

The main cons I notice are that context shifting (and not being able to directly see what a function does when looking at it) takes time and makes it difficult to interpret what a function does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    upkeepmaintenance, infrastructure, and similar

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions