Post #2813118
2026-05-11 18:07 UTC
Replies (1)
-
@erisceleste@tech.lgbt 2026-05-12 00:01
@thephd@pony.social if the question is, can you not only match on two types but also introduce identifiers for them, i think you're definitely requiring a tree-like structure of nested generics (outer match on argument 1, each branch of which leads to a match on argument 2, each nbranch of which leads to a match on argument 3 ...) because each introduced identifier would require its own generic, no? i doubt i have much to contribute that you haven't thought of: a few years ago i apparently came up with https://stackoverflow.com/a/25715458/1366431 but i can't see how that's any better than being able to use the function pointer technique now the main thing i was investigating recently was whether you can use generic for open-set/c++ stye overloading: you can, but it's ugly, you just need a dispatcher and to re-register your starting point i don't think this has a ton to do with what it sounds like you want to achieve though sorry @simontatham@hachyderm.io