# Dynamically Create a Function - Initial Idea with eval failed due to World Age Issue

**URL:** <https://discourse.julialang.org/t/dynamically-create-a-function-initial-idea-with-eval-failed-due-to-world-age-issue/49139>\
**Category:** General Usage\
**Tags:** metaprogramming, eval, runtimegeneratedfunc, world\_age\
**Created:** [October 27, 2020, 6:26pm UTC](https://discourse.julialang.org/t/dynamically-create-a-function-initial-idea-with-eval-failed-due-to-world-age-issue/49139 "2020-10-27T18:26:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [October 27, 2020, 6:34pm UTC](https://discourse.julialang.org/t/dynamically-create-a-function-initial-idea-with-eval-failed-due-to-world-age-issue/49139/2 "2020-10-27T18:34:34Z")

</div>

Have you seen this thread:

> [@Best performance for eval of expressions with parameters](https://discourse.julialang.org/t/best-performance-for-eval-of-expressions-with-parameters/43443):
>
> I try to achieve better/best performance for eval(expression). Up to now I found 5 more or less different possibilities (in respect to my code logic) to eval an expression. It’s best, to see it in code. The following MWE can be directly copy&pasted into a REPL. It reflects my real projects structure in a minimal way. Some notes about it: the try...catch...end is needed, because the real expressions e can result in errors, e.g. (-0.5) ^ 0.9 f3::Function is not a real option, its just for co…

I am happy with

```julia-auto
GeneralizedGenerated

```

and all my tests I have shown that it results in best performance for generated functions.

---

_[View the full topic](https://discourse.julialang.org/t/dynamically-create-a-function-initial-idea-with-eval-failed-due-to-world-age-issue/49139)._
