@article{belyakova:world-age:oopsla:2020, author = {Belyakova, Julia and Chung, Benjamin and Gelinas, Jack and Nash, Jameson and Tate, Ross and Vitek, Jan}, title = {World Age in Julia: Optimizing Method Dispatch in the Presence of Eval}, year = {2020}, issue_date = {November 2020}, publisher = {Association for Computing Machinery}, address = {New York, NY, USA}, volume = {4}, number = {OOPSLA}, url = {https://doi.org/10.1145/3428275}, doi = {10.1145/3428275}, abstract = {Dynamic programming languages face semantic and performance challenges in the presence of features, such as eval, that can inject new code into a running program. The Julia programming language introduces the novel concept of world age to insulate optimized code from one of the most disruptive side-effects of eval: changes to the definition of an existing function. This paper provides the first formal semantics of world age in a core calculus named juliette, and shows how world age enables compiler optimizations, such as inlining, in the presence of eval. While Julia also provides programmers with the means to bypass world age, we found that this mechanism is not used extensively: a static analysis of over 4,000 registered Julia packages shows that only 4-9% of packages bypass world age. This suggests that Julia's semantics aligns with programmer expectations.}, journal = {Proc. ACM Program. Lang.}, month = nov, articleno = {207}, numpages = {26}, keywords = {dynamic languages, method dispatch, compilation, eval} }