A module-limited reload, which seems potentially helpful to app flexibility 
and quite helpful to an IDE, would need to do the right thing with a module 
embedded in another module .. even when the outer module include()s a file 
containing the inner.

On Tuesday, January 5, 2016 at 10:38:21 PM UTC-5, Kevin Squire wrote:
>
> Presumably, it would just parse (and run?) the code within `module Foo ... 
> end`, and ignore anything outside of that.
>
> On Mon, Jan 4, 2016 at 9:03 AM, Stefan Karpinski <ste...@karpinski.org 
> <javascript:>> wrote:
>
>> What would it mean to reload a module rather than a file?
>>
>> On Sun, Jan 3, 2016 at 4:19 AM, <ele...@gmail.com <javascript:>> wrote:
>>
>>> Reload reloads the *package* not the module, see 
>>> http://docs.julialang.org/en/release-0.4/stdlib/base/#Base.reload.
>>>
>>>
>>> On Sunday, January 3, 2016 at 5:16:07 PM UTC+10, Greg Plowman wrote:
>>>>
>>>> This seemed a little non-obvious to me as well.
>>>>
>>>> I guess the take-away is that "loading" a module (via any means, not 
>>>> just reload??) loads the entire *file* containing the module, not just 
>>>> the stuff between module Foo end.
>>>> Only the stuff between module Foo end is scoped to the module, but the 
>>>> entire file is loaded.
>>>>
>>>> Is this correct?
>>>>
>>>>
>>>> On Sunday, January 3, 2016 at 3:50:58 AM UTC+11, Alexander Ranaldi 
>>>> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> Consider the following code which is in the file Foo.jl
>>>>>
>>>>> module Foo
>>>>>
>>>>>
>>>>> function bar(x, y)
>>>>>     x + y
>>>>> end
>>>>>
>>>>>
>>>>> end
>>>>>
>>>>> reload("Foo")
>>>>>
>>>>>
>>>>> Then, at the REPL:
>>>>>
>>>>> julia> include("Foo.jl")
>>>>>
>>>>> Julia does not return. Can someone help me understand what is 
>>>>> happening here? Is the module being infinitely reloaded?
>>>>>
>>>>> Thank you
>>>>>
>>>>
>>
>

Reply via email to