开发者

I need some examples of sending parameters in smalltalk

开发者 https://www.devze.com 2023-03-16 14:58 出处:网络
How do I send parameters in smalltalk: Pass-by-Value Pass-by-Result P开发者_开发百科ass-by-Value-result

How do I send parameters in smalltalk:


You can safely assume that all parameters in smalltalk are passed by reference.

There's only one exception for immediate object (smallintegers) which are passed by value, but its an implementation detail (different implementations could have different kinds of immediate object classes).


AFAK, Smallscript Smalltalk uses pass-by-value as default unless you use the & sign for pass by reference just like C++, there is more information on this here.

But traditionally Smalltalk uses pass by reference as mentioned here and here.

0

精彩评论

暂无评论...
验证码 换一张
取 消