-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
docsThis change adds or pertains to documentationThis change adds or pertains to documentation
Description
The following statement seems wrong ('Documentation / Type / Mutable Composite Types'):
- An object with an immutable type is passed around (both in assignment statements and in function calls) by copying, whereas a mutable type is passed around by reference.
This reads to me as if values are copied, which seems not to be the case. See 'Documentation / Functions / Argument Passing Behavior':
Julia function arguments follow a convention sometimes called "pass-by-sharing", which means that values are not copied when they are passed to functions. Function arguments themselves act as new variable bindings (new locations that can refer to values), but the values they refer to are identical to the passed values.
Edit: removed misleading example
Metadata
Metadata
Assignees
Labels
docsThis change adds or pertains to documentationThis change adds or pertains to documentation