It's been a long time since I last used Roc. How's effects managed in Roc?
I designed my own language, and discovered that effects can be entangled with each other.
<A~B>; <A, B>; <A, A, B> are have different meanings
This allows the compiler more freedom to reorder your code. It's unfriendly towards text-based languages though.
In this, are you asking about how dependencies between effects are handled?
Just not used to the <A~B>; <A,B>
notation?
The entire syntax of my language: 1.jpg 2.jpg 3.jpg
Brendan Hansknecht said:
In this, are you asking about how dependencies between effects are handled?
Just not used to the
<A~B>; <A,B>
notation?
Forget about the notation. It's hard to express non-linearity in text.
I think I'm the first to propose this. All current literature and programming languages based on lambda calculus is bound by linearity of text.
I'll have to read through this more later when I have more time, but i think the common answer is that effects in roc will be explicitly specified in a sequential ordering. That being said, platforms can expose primitives and semantics that enable more complex orderings.
I understand "effects" as holes. Like negative space in art.
Roc effects are managed in their types, similar to the the monadic construction of effects. dependencies are embedded in the types, which means, as Brendan said, that the runtime can reordered layered effects at-will (i.e. the "multiplication" operation of monadic effects). It sounds like your approach may be more in-line with algebraic effects and effect handlers.
Last updated: Jul 06 2025 at 12:14 UTC