wrote up an idea I talked about with @Folkert de Vries the other day - feedback welcome!
https://github.com/rtfeldman/roc/issues/2405
(probably easiest to discuss feedback here instead of in the comments there, just to keep it in one place)
I like that, it feels better than a magical fx
maybe I didn't mean to say magical. But what the proposal suggests seems to fit together nicely with the language and it feels pretty natural to have it as a module with a special header
Why is a dedicated Effect module necessary at all? Can Effect just be a builtin type that any function can use, and then the platform's effects can just be defined in any (or multiple/all) of the platform's modules and exposed normally?
I guess I don't understand the original purpose of the effects fx.Effect block.
I like this proposal, and I'm curious if we can take it even farther/simpler :smile:
JanCVanB said:
Why is a dedicated
Effectmodule necessary at all? CanEffectjust be a builtin type that any function can use, and then the platform's effects can just be defined in any (or multiple/all) of the platform's modules and exposed normally?
that's how it is now
you access that builtin via fx.
JanCVanB said:
I guess I don't understand the original purpose of the
effects fx.Effectblock.
so that we know which platform functions to map to. On the platform side things defined in that block can be found with a name like roc_fx_nameOfFunction
Gotcha, thanks!
Last updated: Jun 16 2026 at 16:19 UTC