Working on a new encoding for 1.0 to get closer to...
# arrow-contributors
r
Working on a new encoding for 1.0 to get closer to suspend, continuations and computational blocks and further away from Haskell Like type classes, kind emulation, etc as those are the less popular and most costly to maintain arrow features. This new encoding is based on arrow-continuations for binding but general enough to model any other functionality besides monad bind which is what’s shown in here. Now we are basing continuations and monad bind in arrow-continuations we can get rid of the nasty reflection tricks 🎉 and we are almost MPP. Feel free to comment in a thread here if anyone has any opinions, suggestions or questions. Thanks! https://gist.github.com/raulraja/5f29a00df261d8fbcfa94b6f2dd44ec6
😎 2
🎉 5
😍 3
s
Copy code
fun interface Plus<A> {
  infix operator fun A.plus(other: A): A
}
this is what
Semigroup
would look like?
Copy code
suspend fun listComputationTest(): List<String> =
  list {
    val a = listOf(1, 2, 3)()
    val b = listOf("a", "b", "c")()
    "$a$b"
  }
would ALL computational blocks require suspend? right now
either
doesn't need that AFIK
a
I believe you do not need suspend there
r
not all computational blocks require suspend but the block itself is a suspended function in order to be able to bind
@stojan yeah that is what semigroup would look like
👍 1
s
does this affect the comprehensions plugin in meta?
r
Yes it will be gone. There will be no flatMap rewriting comprehensions as these can be specialized per data type with a faster runtime like in the case of either where it can be implemented in terms of fold and optimize the happy path
👍 1