ah, great. i won't make a new package then. thanks.
On Thursday, 12 November 2015 09:30:21 UTC-3, Yichao Yu wrote: > > https://github.com/JuliaLang/julia/issues/7449 > https://github.com/JuliaLang/Compat.jl/pull/131 > https://github.com/JuliaLang/julia/issues/5892 > > On Thu, Nov 12, 2015 at 7:23 AM, andrew cooke <and...@acooke.org > <javascript:>> wrote: > > > > when you're writing code that uses macros, supporting different versions > of > > julia seems to be more complex than normal. in particular, things like: > > > > if VERSION > XX > > # code with macros here > > end > > > > don't work as expected, because macro expansion occurs before runtime > > evaluation. so the macros are expenaded whatever version. > > > > given that, i have found this simple macro to be useful; > > > > macro cond(test, block) > > if eval(test) > > block > > end > > end > > > > @cond VERSION >= v"0.4" begin > > # code with macros here > > end > > > > anyway, my questions are: (1) is the above sensible and (2) does this > > already exist? > > > > thanks, > > andrew > > >