3 ms·
Yet open up nearly any large golang codebase and you’ll find a channel being used to return a single answer response in the future.
by kasey_junk 8y ago
Yet open up nearly any large golang codebase and you’ll find a channel being used to return a single answer response in the future.
- emersion 8y agoWhat's wrong with that? Go has channels thus it doesn't need futures/promises.
- kasey_junk 8y agoSome problems are more simply modeled as futures/promises than csp. Go’s unsophisticated type system makes it difficult to write a good standard generic data structure library such as a future/promise library. That leads to people either writing a poor replacement, not using that style, or losing type safety. This is precisely what you would predict upon learning golang doesn’t have user defined genetics & ive had it bite me more than once in real projects.