←back to thread

116 points doekenorg | 1 comments | | HN request time: 0.222s | source
Show context
donatj ◴[] No.44498833[source]
I have read much about Fibers since they were introduced and have never come up with a real use case.

All the examples I find are like the trivial ones here where it just feels like instead of jamming a bunch of code into a single messy function that yields, you'd be better off particularly from a static analysis standpoint just having ordered method calls or chained callables where each step returns the next step as a callable.

I've yet to see a use case where I can't come up with a safer way to do it without Fibers, but I would love if someone could enlighten me because I feel like I am absolutely missing something.

replies(4): >>44499326 #>>44499413 #>>44499430 #>>44502332 #
1. bornfreddy ◴[] No.44502332[source]
I think you're not missing anything (or at least, I'm missing it too - not much advantage over yield). Generators rock though.