什么(有没有)只有传递参考的语言?

Der*_*unk 4 programming-languages parameter-passing pass-by-reference

我在想.是否存在使用传递引用作为其评估策略的语言?

Sea*_*ean 6

我不知道"eval策略"是什么,但Perl子程序调用只是传递引用.

sub change {
    $_[0] = 10;
}

$x = 5;
change($x);
print $x;  # prints "10"
change(0);  # raises "Modification of a read-only value attempted" error
Run Code Online (Sandbox Code Playgroud)