There's something I haven't quite understood about the language... It compiles a function the first time that function is run... So I should be able to save a file from that
that julia should be able to link to...? Is there a way to run a module in julia 3, freeze the machine code that this generates, and afterwards just let julia 4 use that without re-compiling? On Fri, Oct 16, 2015 at 10:26 PM, Tony Kelman <t...@kelman.net> wrote: > You can continue using 0.3 if you want to use 0.3-developed code without > changes or warnings. Yes, the purpose of Compat is to allow using the new > 0.4 syntax, eliminating deprecation warnings but allowing the code to still > run on 0.3. > > > On Friday, October 16, 2015 at 9:27:59 PM UTC-7, Forrest Curo wrote: >> >> Um... In other words, I can run my old code using julia 0.3 but if I >> want to add new things in julia 0.4 syntax, Compat will translate it so >> julia 0.3 can run it? >> >> Nothing to convince julia 0.4 to look up & use an older graphics package? >> (That's really the issue here... The graphics for this were a trivial >> hassle I thought I'd finished, & now I'm needing to excavate & reconstruct >> that in order to use them.) >> >> On Fri, Oct 16, 2015 at 8:41 PM, Matt Bauman <mba...@gmail.com> wrote: >> >>> On Friday, October 16, 2015 at 11:29:40 PM UTC-4, Forrest Curo wrote: >>>> >>>> Okay, this might be a good time to explain that 'Compat' package. >>>> Evidently I do have it, because I can't Pkg.add it... How does this work? >>>> >>> >>> See the readme here: https://github.com/JuliaLang/Compat.jl >>> >>> The short version is that it allows you to write code using the new 0.4 >>> names and syntaxes, while still providing compatibility for 0.3. For the >>> most part, you're able to update your code to the new 0.4 names and simply >>> saying `using Compat` at the top of your file will make things work on >>> 0.3. There are some syntaxes, however, whose new form is an error on 0.3. >>> In those cases, you can use the `@compat` macro. For example, a function >>> definition like `f(x::Union(Int,Float64)) = 2` would become >>> `f(x::@compat(Union{Int,Float64})) >>> = 2`. >>> >> >>