Zakaria
Zakaria

Reputation: 1013

I need some examples of sending parameters in smalltalk

How do I send parameters in smalltalk:

Upvotes: 1

Views: 1747

Answers (2)

Igor Stasenko
Igor Stasenko

Reputation: 1137

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).

Upvotes: 6

Auxiliary
Auxiliary

Reputation: 2757

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.

Upvotes: 2

Related Questions