On 12 December 2013 19:04, Eliot Miranda <[email protected]> wrote:
>
>
>
> On Thu, Dec 12, 2013 at 7:03 AM, Marcus Denker <[email protected]>
> wrote:
>>
>>
>> On 12 Dec 2013, at 15:44, Benjamin <[email protected]>
>> wrote:
>>
>> > I just discovered that in Pharo 3 you can do:
>> >
>> > [ :bool |
>> >       self logCr: bool.
>> >       bool := false.
>> >       self logCr: bool.
>> >       ] value: true
>> >
>> > Is this a bug or a feature ?
>>
>>
>> https://pharo.fogbugz.com/f/cases/12419/block-arguments-should-be-read-only
>
>
> except that it didn't used to be a bug pre closures, so *if* its important
> to be able to load old code this should be made a preference which is by
> default on.  i.e. by default assigning to any argument is an error, but the
> preference can be set to allow assignments to block args.  At least IIRC
> that's how it is in Squeak right now.

It is: "Allow block argument assignment", or Scanner >>
#allowBlockArgumentAssignment, depending on where you look.

frank

> --
> best,
> Eliot

Reply via email to