# Recommended ways to work around world age issues in v0.6?

**URL:** <https://discourse.julialang.org/t/recommended-ways-to-work-around-world-age-issues-in-v0-6/1701>\
**Category:** Internals & Design\
**Created:** [January 26, 2017, 1:39pm UTC](https://discourse.julialang.org/t/recommended-ways-to-work-around-world-age-issues-in-v0-6/1701 "2017-01-26T13:39:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Post date:** [January 26, 2017, 1:39pm UTC](https://discourse.julialang.org/t/recommended-ways-to-work-around-world-age-issues-in-v0-6/1701/1 "2017-01-26T13:39:52Z")

</div>

I ran into a problem yesterday with [https://github.com/JuliaIO/Formatting.jl](https://github.com/JuliaIO/Formatting.jl) not working on v0.6 (I posted the following issue: [https://github.com/JuliaIO/Formatting.jl/issues/27](https://github.com/JuliaIO/Formatting.jl/issues/27), as I don’t know how to work around this issue yet - once I do, I can submit a PR to fix the problem).

Basically, the code is using `quote` and `eval` to generate a function that wrap a call to the `@sprintf` macro with specific arguments, and then store those functions for reuse in a `Dict`, the first time that format has been seen, and then immediately calling that function.  
That seems to be pretty useful functionality, however it doesn’t work anymore due to (AFAICT) [https://github.com/JuliaLang/julia/pull/17057](https://github.com/JuliaLang/julia/pull/17057).

What would be the most performant way of doing this in v0.6?

---

<div class="post-metadata">

**Author:** ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Post date:** [January 26, 2017, 10:14pm UTC](https://discourse.julialang.org/t/recommended-ways-to-work-around-world-age-issues-in-v0-6/1701/2 "2017-01-26T22:14:49Z")

</div>

I don’t know if it is the most performant way of handling this, but I’ve found at least one workaround finally:

```julia
if VERSION >= v"0.5.0"
    cfmt( fmt::ASCIIStr, x ) = eval(Expr(:call, generate_formatter( fmt ), x))
else
    cfmt( fmt::ASCIIStr, x ) = (generate_formatter( fmt ))(x)
end

```

I’m concerned, because normally you don’t want to call eval, I’m hoping somebody can clarify this issue, as to how this will affect performance.

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [January 27, 2017, 12:08am UTC](https://discourse.julialang.org/t/recommended-ways-to-work-around-world-age-issues-in-v0-6/1701/3 "2017-01-27T00:08:46Z")

</div>

That’s precisely what the documentation suggests: [http://docs.julialang.org/en/latest/manual/methods.html#Redefining-Methods-1](http://docs.julialang.org/en/latest/manual/methods.html#Redefining-Methods-1)

---

<div class="post-metadata">

**Author:** ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Post date:** [January 27, 2017, 12:12am UTC](https://discourse.julialang.org/t/recommended-ways-to-work-around-world-age-issues-in-v0-6/1701/4 "2017-01-27T00:12:22Z")

</div>

Ah, good! I’d been looking in the discussion about the change in the GitHub PR comments, and hadn’t seen a recommended workaround there, and had heard about an `invokelatest` function, but I wasn’t able to find that in master.
