Post #3213184
2023-11-03 22:15 UTC
@gsuberland@chaos.social @thephd@pony.social You could kinda build that with effect systems, treating each instruction as an effect and only allowing static/predetermined effects to run after an optimization pass, essentially allowing you to have nice-ish macros if you want but still build a somewhat usable language.
Though the exact effects would need to be tied to the architecture, only allowing abstractions shareable between architectures on a higher level where you don't have direct control of the hardware.
Replies (1)
-
@gsuberland@chaos.social 2023-11-03 22:28
@ignaloidas@not.acu.lt @thephd@pony.social my worry with that approach is that you end up with greater cognitive load than writing something like LLVM IR directly, which is already pretty heavy work. I can certainly see it being a beneficial approach if you're going for formal verification, though.