I'm just pointing out that you can't change a global binding without
declaring it to be global. That's why I'm confused about what the warning
could possibly be for.


On Wed, Jun 11, 2014 at 11:30 AM, Tony Fong <[email protected]> wrote:

> You are assuming perfect knowledge of Julia and with a fresh mind on the
> part of the user...
>
>
> On Wednesday, June 11, 2014 11:26:48 AM UTC-4, Stefan Karpinski wrote:
>
>> f2 doesn't modify global foo – precisely because it doesn't declare foo
>> to be global. So there's nothing to warn about...
>>
>>
>> On Wed, Jun 11, 2014 at 10:58 AM, Tony Fong <[email protected]
>> > wrote:
>>
>>> I'm struggling with something like this:
>>>
>>> Module M
>>>   foo = 1
>>>   bar()=foo # it's not obvious if foo can be modified. Ok, maybe I
>>> should not need a FYI even.
>>>   f1()=(global foo=2 ) # this is clear.
>>>   f2()=(foo = 3 ) # how could I get a warning out of this? it's
>>> perfectly legal and may or may not do what the author intends.
>>> end
>>>
>>>
>>>

Reply via email to