On 8/7/13 12:33 PM, Levente Uzonyi wrote:
On Wed, 7 Aug 2013, psea wrote:
What's worried me is that in other languages I'm familiar with it's a normal thing to assign to a function argument (Scheme, C, Python, JavaScript).
Storing into a block or method argument is considered bad practice. Support for it is/was planned to be removed. Even though it can yield somewhat better performance, it's something you'll rarely see in Smalltalk code.
Why is storing into a block or method argument considered bad practice? Better performance seems like a good reason to follow the practice. I must assume there are dangers, non-obvious to beginners like me, which causes the practice to become bad. Of course, one reason is that Squeak doesn't properly support it today but as mentioned earlier other ST systems support the practice so I'm curious what causes it to be considered bad.
-- Edwin