Skip to content

Convention to name internal functions #340

Closed

Description

@GegznaV

While workng on #238 (via #338) I found this in Arith.R:

# naming scheme for the internal functions:
# .<generic>_<x><y> with <x> and <y> the first and second parameter/operand:
# h ... hyperSpec object
# n ... numeric (scalar, vector, or matrix)
# m ... matrix
# _ ... missing

We can extend it to, e.g.:

# naming scheme for the internal functions:
# .<generic>_<x><y><...> with <x>, <y>,  etc. the first, second and later parameter/operand:
# _ ... missing
# a ... array
# d ... data frame
# f ... formula
# h ... hyperSpec object
# m ... matrix
# n ... numeric (scalar, vector, or matrix)

And add to CONTRIBUTING.md

What do you think?

Activity

  1. added
    Topic: style ✏️
    on Jul 14, 2021
  2. cbeleites commented on Jul 15, 2021

    @cbeleites
    Owner

    would be fine with me - but do we actually have these cases?

  3. GegznaV commented on Jul 15, 2021

    @GegznaV
    CollaboratorAuthor

    In the extension table, I wrote the abbreviations of object typers that were used by methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Note: guidelineTopic: style ✏️

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions