Any reason for assigning block parameter in inject:into:

Alan Lovejoy squeak-dev.sourcery at forum-mail.net
Mon Apr 30 00:47:04 UTC 2007


<Vassili>I see the "classic" policy of disallowing the latter as an
arbitrary restriction, even when supported by emphatic
hand-waving.</Vassili>

I concur.  The restriction on assignment to arguments simply creates an
unnecessary semantic distinction between arguments and other variables, and
so adds complexity to the denotational semantics of Smalltalk syntax.  It's
not as bad as Java's distinction between objects and primitive values, but
it's a language design flaw of the same sort.

Bindings/assignments are not axioms, and Smalltalk is not a logic/functional
programming language.  Immutable bindings belong in a language where all
bindings are immutable.

--Alan





More information about the Squeak-dev mailing list