Hacker News new | ask | show | jobs
by gugagore 2319 days ago
Julia doesn't make it easy to guarantee that you won't allocate anything on the heap. The semantics of the language don't include really any control over that, yet. I hope one day it does. It seems like a tough problem, because the allocation strategy can depend on the results of inference and compilation, which is another thing that is hard to control since the language try hard to have the semantics not depend on inference.

Of course, you can measure the allocations, and you can see as a matter of fact whether some code allocates, but I would say that it's hard to predict what allocates and what doesn't, and that this is still changing (e.g. https://github.com/JuliaLang/julia/pull/32448)