Skip to content

Tutorial 4.8 call by value vs reference is confusing #148542

@HelenaSeidel

Description

@HelenaSeidel

Documentation

The part about how arguments are passed in Section 4.8 (by value vs by reference) is written in a confusing way and there is even a footnote admitting to it

IMO an improvement would be along the lines:
Arguments are always passed using call by value. For objects that are passed this value consists of a reference to that object. Which means that mutations to the object are visible outside, reassignments of another reference to the variable inside the function are not. insert example

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions