It would make sense to put .jl file-parsing code in a separate,
community-maintained module, because the rules for finding which file a
module corresponds to are not trivial, and can change over time (they
became case-sensitive in 0.5)

It's too bad that

macro module_parser(m)
    m
end

@module_parser module X
a = 10
end

is a syntax error, because it would be cleaner for instrumentation, and for
augmenting Julia's syntax.

Cédric

On Mon, Sep 26, 2016 at 2:08 AM, Andreas Lobinger <lobing...@gmail.com>
wrote:

> Hello colleague,
>
> On Monday, September 26, 2016 at 12:50:44 AM UTC+2, Cedric St-Jean wrote:
>>
>> I faced very similar issues with ClobberingReload.jl. https://g
>> ithub.com/cstjean/ClobberingReload.jl/blob/master/src/ClobberingReload.jl 
>> Check
>> out parse_file (courtesy of @stevengj), parse_module, and creload. I
>> haven't "expanded" the includes, but it seems straight-forward to do with a
>> comprehension.
>>
>
> Thank you. I shortlisted the 'reload' mechanisms anyway, but
> ClobberingReload seems new. Actually i was wondering, if i'm the first one
> to look into code instrumentation. This should be really straight forward
> in julia (i did it once in f77 and that clearly not straight forward...).
>

Reply via email to