Skip to content

Minify stdlib parameter names #42

Description

@brianp

Every stdlib function should use the shortest, easily understood parameter name possible.

For example, say(message: ...) becomes say(msg: ...). The goal is brevity without sacrificing clarity. A developer reading the call site should still immediately know what the argument means.

Guidelines

  • Prefer common, well-known abbreviations: msg, val, fmt, src, dst, buf, len, idx, fn, cb, sep, delim, str, num, err, cmd, dir, env, cfg, ctx, opt, max, min
  • Single-word names that are already short can stay as-is (e.g. name, path, key, port)
  • When two abbreviations are equally clear, pick the shorter one
  • Don't abbreviate to the point of confusion. n is fine for a count in a math context, but name shouldn't become n

Scope

All public stdlib functions across every std/* module. This is a breaking change for any code using named arguments, so it should land as a single pass.

Activity

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

    enhancementNew feature or requestlowNice to have, no rushstdlibStandard library modules and builtins

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions