At Sat, 27 Dec 2008 00:24:02 -0800, Vassili Bykov wrote:
On Thu, Dec 25, 2008 at 7:32 PM, Yoshiki Ohshima <yoshiki@vpri.org> wrote:
At Wed, 24 Dec 2008 11:11:16 +0100, Michael Rueger wrote:
What really is the convenience of modifying an argument? Having not to think up another name? I never understood this argument especially if you need to use the original value of the argument in several places.
If you can think of an argument as a "temp initialized by the caller" (like C), that kind of unifies the args and temps and would reduce the implementation complexity. In *some cases* it would reduce the lines of code in the user land.
Or alternatively one can think of a temp as an argument of an invisible block,
| foo | foo := 3. ...
being a form of
[:foo | ...] value: 3.
If args are assignable, and yes you can unify methods and blocks. But I'm pretty much convinced that debugged context being restartable (by making args readonly) is important in practice. -- Yoshiki