{
  "id": "programming.functions.argument-name-must-match-parameter",
  "uri": "https://open-misconceptions.github.io/miscon-data/m/programming.functions.argument-name-must-match-parameter",
  "uuid": "e7df53b7-374a-4b33-86e9-3c2883c5374f",
  "version": "0.1.1",
  "status": "draft",
  "trust": "low",
  "title": "Arguments are matched to parameters by name",
  "statement": "The variable passed to a function has to have the same name as the parameter, or the function will not receive it.",
  "kind": "misapplied-analogy",
  "domain": "programming.functions",
  "about": [
    {
      "scheme": "Miscon",
      "uri": "https://open-misconceptions.github.io/miscon-data/c/programming.functions.parameter-passing"
    }
  ],
  "level_band": [
    "secondary",
    "undergraduate"
  ],
  "locale": "en",
  "evidence_patterns": [
    {
      "item_shape": "predict the output of a call whose argument name differs from the parameter name",
      "signature": "predicts an error or that the parameter is unset",
      "example": {
        "item": "def show(n):\n    print(n)\nvalue = 5\nshow(value)",
        "expected": "5",
        "response": "Error: n is not defined (or 'nothing')"
      }
    },
    {
      "item_shape": "write a call to a given function",
      "signature": "renames the local variable to match the parameter before calling",
      "example": {
        "item": "Given def area(width, height), compute the area of a rectangle whose sides are stored in w and h.",
        "expected": "area(w, h)",
        "response": "width = w\nheight = h\narea(width, height)"
      }
    }
  ],
  "discriminators": {
    "vs_slip": "Consistent renaming or predicted errors across items. A slip is a single wrong name.",
    "vs": {
      "programming.functions.parameters-alias-arguments": "Aliasers accept different names but expect changes to the parameter to flow back; name-matchers do not accept different names at all."
    }
  },
  "relations": {
    "conflicts_with": [
      {
        "external": "https://open-misconceptions.github.io/miscon-data/c/programming.functions.parameter-passing",
        "label": "Arguments are matched to parameters by position and copied in"
      }
    ],
    "resolved_by": [
      {
        "external": "https://open-misconceptions.github.io/miscon-data/c/programming.functions.parameter-passing",
        "label": "Arguments are matched to parameters by position and copied in"
      }
    ],
    "confusable_with": [
      "programming.functions.parameters-alias-arguments"
    ]
  },
  "provenance": {
    "sources": [
      {
        "type": "paper",
        "citation": "Fleury, A. E. (1991). Parameter passing: The rules the students construct. In Proceedings of the 22nd SIGCSE Technical Symposium on Computer Science Education (SIGCSE '91), 283-286.",
        "doi": "10.1145/107004.107066",
        "note": "Student-constructed rules for parameter passing."
      },
      {
        "type": "paper",
        "citation": "Madison, S., & Gifford, J. (2002). Modular programming: Novice misconceptions. Journal of Research on Technology in Education, 34(3), 217-229.",
        "doi": "10.1080/15391523.2002.10782346"
      },
      {
        "type": "paper",
        "citation": "Qian, Y., & Lehman, J. (2017). Students' misconceptions and other difficulties in introductory programming: A literature review. ACM Transactions on Computing Education, 18(1), Article 1.",
        "doi": "10.1145/3077618"
      }
    ],
    "origin": "llm-drafted",
    "notes": "Drafted from the cited literature for the Open Misconceptions seed pack; statement, examples and discriminators are original text. Awaiting maintainer review."
  },
  "history": {
    "changelog": [
      {
        "version": "0.1.1",
        "date": "2026-09-05",
        "change": "Schema 0.2 migration: about/alignments carry a free-string scheme (corestandards.org URLs relabelled CCSS where present); trust computed from reviews[] (none yet, so low); no change to the statement or evidence."
      }
    ]
  },
  "license": "CC-BY-4.0"
}
