# Suggestion: introduce something like a @inferable or @typestable macro to the language

**URL:** https://discourse.julialang.org/t/suggestion-introduce-something-like-a-inferable-or-typestable-macro-to-the-language/86042
**Category:** Internals & Design
**Created:** [August 19, 2022, 8:45pm UTC](https://discourse.julialang.org/t/suggestion-introduce-something-like-a-inferable-or-typestable-macro-to-the-language/86042 "2022-08-19T20:45:48Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![aramirezreyes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aramirezreyes/32/42573_2.png) [@aramirezreyes](https://discourse.julialang.org/u/aramirezreyes)
#### Post date: [August 19, 2022, 11:29pm UTC](https://discourse.julialang.org/t/suggestion-introduce-something-like-a-inferable-or-typestable-macro-to-the-language/86042/7 "2022-08-19T23:29:11Z")

</div>

Take a look at:

> [@Precompile: Why?](https://discourse.julialang.org/t/precompile-why/78770/8):
>
> That’s an idea, but the “even if supercompile took 3 days” part isn’t hypothetical, it’s actually an underestimate of how long it would take to compile every possible specialization. The number of possible specializations of `f(a::A, b::B)` is `N(A) * N(B)` where `N(T)` denotes the number of concrete implementations of `T`. The number of specializations of `f(a::A, b::B, c::C)` is `N(A) * N(B) * N(C)`. And so on—it’s exponential in the number of arguments and multilinear in the number of concrete implementations of every argument type. Worse still, it is trivial to write a parametric type which has an infinite number of concrete implementations, meaning that the number of possible specializations of `f` would be infinite. So when I said underestimate above I meant that supercompilation would never stop.

So you cannot possibly compile for all the types that can be passed to you functions, even if they are inferrable. To compile for a specific set of concrete types you can use StaticCompiler.jl. Yes, the tooling for what Jeremy Howard mentions is not there yet. But it is not because of this.

[This](https://www.youtube.com/watch?v=GnsONc9DYg0) talk by Tim Holy talks about the current state in some of those matters.

---

_[View the full topic](https://discourse.julialang.org/t/suggestion-introduce-something-like-a-inferable-or-typestable-macro-to-the-language/86042)._
