On Tue, Mar 18, 2014 at 10:10 AM, Christophe Demarey < christophe.dema...@inria.fr> wrote:
> Why arguments should be read only? > They are just temporary variables with an initial value. > Read the blue book. It was a decision of the language designers to forbid assignment to arguments to allow debugging. The assignment to block arguments is a side-effect of the old BlockContext implementation of blocks where block arguments were mapped onto temporary variables of the home context. It is an anachronism and should be forbidden also. 2014-03-18 15:45 GMT+01:00 Nicolai Hess <nicolaih...@web.de>: > >> similiar to issue 12419 <https://pharo.fogbugz.com/default.asp?12419> >> block arguments should be read only >> >> >> 2014-03-18 15:21 GMT+01:00 Camille Teruel <camille.ter...@gmail.com>: >> >> Indeed, I can compile: >>> >>> C>>foo: arg >>> ^ arg := 3 >>> >>> And 'C new foo: 1' returns 3... >>> >>> >>> On 18 mars 2014, at 15:16, Igor Stasenko <siguc...@gmail.com> wrote: >>> >>> > extent: newExtent >>> > >>> > vertical >>> > ifTrue: [ newExtent := self defaultWidth @ newExtent y ] >>> > ifFalse: [ newExtent := newExtent x @ self defaultWidth ]. >>> > >>> > super extent: newExtent >>> > >>> > Can you verify it? Arguments should be not assignable. >>> > >>> > -- >>> > Best regards, >>> > Igor Stasenko. >>> >>> >>> >> > > -- best, Eliot