18 karma · joined Apr 9, 2026 (8mo ago) · 13 submissions
comment 2mo ago · link · parent
comment 2mo ago · link · parent
Edit: I now watched the animation. It's exactly the same as the YT video. Speed of light is very, very slow.
comment 2mo ago · link · parent
comment 4mo ago · link · parent
With the newly added type parameters on methods you can now implement monads that do the function chaining and error handling like in Haskell. But it still wouldn't look as nice imho. This will probably become the next Golang anti-pattern.
comment 4mo ago · link · parent
comment 5mo ago · link · parent
comment 8mo ago · link · parent
I don't think "channels without go routines" are possible. One thread can't send and simultaneously receive on a channel. I remember libraries that used go channels for control flow because the code looked better this way. They had to start a second thread to make it work which is very inefficient.
Better approaches are "functions" with internal state (generators) or the relatively new stdlib iter package.
Edit: the iter package internally uses compiler quirks to implement coroutines to be able to send and receive values on the same thread.