I'm in favor of keeping just EnvIO and make the ot...
# arrow
p
I'm in favor of keeping just EnvIO and make the other two an alias using
Nothing
for the fields they don't use.
r
The issue is that for what we've found so far some optimizations can't be applied to EnvIO directly
@simon.vergauwen
s
While I think
typealias IO<A> =  EnvIO<Nothing, Nothing, A>
is very elegant but I do share @raulraja his concern about the optimisations.
I am not sure how much of a maintenance headache having 3 effect types will result in nor how much of a difference it’ll be.
r
If we want performance so far we found different data types is faster because we can apply individual optimizations as to how effects are processed and programs are composed with flatmap
p
The issue is that for what we've found so far some optimizations can't be applied to EnvIO directly
such as?
r
We are using now mutation in the ADTs to avoid allocations if we find a consecutive node
In EnvIO all values are functions
And we can't optimize pure, map, flatmap etc as directly over io
Because there is always the additional allocations
s
EnvIO
is
(R) -> IO<E, A>
right?
r
yes
but with special combinators to inject the effect of that shape
effect
can take one of those and bind to
A