Skip to content

Parameters #2: Alternate Terms for a Parameter Kind #1159

@RexJaeschke

Description

@RexJaeschke

Recently, I had cause to review the spec in terms of function parameters, and argument passing. [This was regarding adding future support for ref readonly parameters.] I found a lot of places where the text could be considerably simplified, made consistent, or have duplication of normative text removed. This issue deals with one aspect, and is not intended to result in any semantic changes. Rather, it is intended to create a better base on which to add future feature specs. Hopefully, we can decide offline on each proposal without taking up TG2 meeting time.

Issue

Variables.md, 9.2.8 Input parameters, states

A parameter declared with an in modifier is an input parameter.

So, the term “input parameter” is defined (and matches the parent section name). However, while 61 occurrences of text about input parameters uses that term, 33 occurrences use “in parameter” instead, for no obvious reason and with no value added.

The same situation exists for “output/out parameter” (9.2.7 Output parameters) and “reference/ref parameter” (9.2.6 Reference parameters).

[There is no such duplication for “value parameter.” 9.2.5 Value parameters states: “A parameter declared without an in, out, or ref modifier is a value parameter, and “value parameter” is used throughout.]

Proposal

  • Change all “in parameter” to “input parameter.”
  • Change all “out parameter” to “output parameter.”
  • Change all “ref parameter” to “reference parameter.”
  • Also, change such text not having the backticks, as in “out parameter.”
  • Change the term definition “by-reference parameter” to “by-reference parameter.”
  • Change all enumerated lists “input, output, and/or reference parameter” to the corresponding group term “by-reference parameter.”

Discussion

The term “by-reference parameters” is defined in 15.6.2.3.1 General and only referenced in Clause 15. It’s simply used to organize related subclauses as a group, so let’s use it instead of an enumerated list of its members.

Metadata

Metadata

Assignees

Labels

type: clarityWhile not technically incorrect, the Standard is potentially confusing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy