2026-04-16 17:17 UTC
@bal4e A problem with generics + proof objects currently is that inlining becomes load-bearing for correctness because functions don't have the required target features.
There have been ideas of using effects (so like the WIP const polymorphism, but more general) to effectively make all downstream functions have the necessary target features.
And then there is still the problem of how to dispatch. I believe we disqualified ifuncs as too hacky/fragile at some point, though I don't remember the details. In any case the stdlib implementation is bad when asking for multiple target features, it would be neat if we could move it into core, etc.
Replies (1)
-
@bal4e@tech.lgbt 2026-04-16 19:23
@folkertdev Mhm. To clarify what I meant by "ifuncs": I meant the general idea of "have an indirect function call and update the ptr on the first invocation", nothing more specific. If GCC's ifunc impl is weird (and that is what you were referring to) we can ignore it. If you had disqualified the general idea of ifuncs, I'd be curious to know why; I hope you can dig up the details. Maybe they are hard to implement portably.