call-by-value

Parameter passed copied

Call-by-value is a way of passing information to a function in programming: the function receives a copy of the data rather than the original.

Changes made inside the function don't affect the original variable.

Most programming languages use call-by-value by default.

Contrast with call-by-reference, where the function can modify the original.

semantics

parameter

Boundary-setting factor

copy · primitive · expression

isolation

local

Of this area

side-effect · protection · independence · separation · immutability · snapshot · callee · modification · original · preserved

memory

stack

Items piled vertically

duplicate · space · overhead · performance · primitive · temporary · deallocation

Family

call, calls, called, calling, caller, callers, callback, callbacks, value

Familiarity
Top 1,000,000
Profile
Used worldwide · Timeless · Abstract · Rated G