Post #2813116
2026-05-11 17:21 UTC
@simontatham@hachyderm.io I have no good solution for multi match generics other than the function pointer arguments trick. I have sat down to try and figure out a non-amviguous syntax for this but it has not worked out at all. It's similar to the problem of trying to initialize multiple different types in for loop init expressions: very little syntactic space to maneuver.
That being said, maybe we need to grow a little beyond Generic if we want this kind of power.
Replies (1)
-
@thephd@pony.social 2026-05-11 17:22
@simontatham@hachyderm.io nesting generics is a little less.problematic but nested macro and expansion can get compile-time expensive.