On Thu, Dec 24, 2020, 1:18 AM Martin Hanson <greencopperm...@yandex.com> wrote:
> I'm sorry, but this is not real life problems. This is exactly the problem > with this proposal. It's based on nothing but small theoretical examples. > Sorry, I don't understand. Here are some of the example applications which Ian mentions in the article. - Find smallest/largest element in slice - Find average/standard deviation of slice - Compute union/intersection of maps - Find shortest path in node/edge graph - Apply transformation function to slice/map, returning new slice/map - Read from a channel with a timeout - Combine two channels into a single channel - Call a list of functions in parallel, returning a slice of results - Call a list of functions, using a Context, return the result of the first function to finish, canceling and cleaning up extra goroutines While they are all fairly low-level, these are all examples which have a high degree of real-life utility. Some of these items have non-trivial solutions which are easy to get wrong and difficult to optimize. In my view, that increases the value of any solution to these problems which uses generics. Perhaps in complaining they are theoretical you are saying that you would like to see concrete implementations of these problems rather than a bulleted list. That's fair. However, I can understand why that wasn't part of the original article, given that some of the implementations are not blog-sized, and the proposal is still in flux. Maybe we can begin to explore what the solutions can look like. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CALJzkY8Doa1Fxe_U_283q%2BM1wrEc2AtyPHEiftPDYKL1W3%2BE%3DQ%40mail.gmail.com.