4 ms·
Colored functions are a huge hit to take, and the things you do to make colored functions tolerable are also things you can do to mask off the complexity of cha
by tptacek 2y ago
Colored functions are a huge hit to take, and the things you do to make colored functions tolerable are also things you can do to mask off the complexity of channels from library callers. Async/await for Go seems like it would not be a win.
I think exceptions are pretty much a dead letter in new language designs at this point? You could get people on board for real algebraic types and matching.
- hot_gril 2y agoSince the boat has already sailed for Golang having async/await from the start, adding it now would require maintaining compatibility with uncolored functions. Waiting for a channel to have data from a go func is similar. JS has similar compatibility with uncolored code using Promises. Python's migration to async/await is a lot worse because it didn't have coherent parallelism features to begin with. Exceptions are a smaller deal than async/await. Basically instead of manually writing "if err" everywhere, it's implicit if you aren't catching it. The most popular languages do this. Rust "?" syntax is also a decent compromise.
- deleted 2y ago[deleted]