Any reason for assigning block parameter in inject:into:

Blake blake at kingdomrpg.com
Mon Apr 30 03:13:54 UTC 2007


On Sun, 29 Apr 2007 14:52:45 -0700, <bryce at kampjes.demon.co.uk> wrote:

> tim Rowledge writes:
>  > The difference is that both you, Bert, and Colin are quite versed in
>  > Smalltalk. Anyone looking at Smalltalk as if it were C or some other
>  > dismal bit-mangling nonsense might very well be seeing the method
>  > parameter(s) as pointers.
>
> C copies the arguments and allows you to change them. Just
> like Smalltalk would if we allowed arguments to be changed.
> I think Pascal didn't allow arguments to be changed. Personally
> I'm happy with the status quo, but could live with mutable
> arguments too.

Traditional Pascal had only by-value arguments, I believe.

I think Turbo Pascal 1.0 introduced by-ref arguments--well, actually UCSD  
Pascal probably introduced them earlier, and that was 25 years ago. (The  
current iteration has by-value, by-ref changeable and by-ref NOT  
changeable (as an optimization).

I don't really have a dog in this race but does it make sense to care what  
someone coming from another language might think? Shouldn't internal  
consistency be the primary consideration?

	===Blake===



More information about the Squeak-dev mailing list