Jesse Wilson
(replying to Saagar Jha)
@saagar or abuse your favorite language’s async feature
Kotlin:
suspend fun sum(a: UInt, b: UInt): UInt {
enableDeepRecursion()
if (a == 0) return b
return sum(a - 1, b + 1)
}
suspend fun enableDeepRecursion() {
yield() // ✨
}
Saagar Jha
(replying to Jesse Wilson)
@jessewilson Yeah it’s funny that you can basically just make languages do this inefficiently if you want but you can’t get them to do it efficiently