3 ms·
Concurrency is hard generally, so I agree with that. > The introduction of generics should make it easier to wrap these lower level concurrency primitives into
by ainar-g 4y ago
Concurrency is hard generally, so I agree with that.
> The introduction of generics should make it easier to wrap these lower level concurrency primitives into higher level safe constructs without needing code generation or runtime type casting via interface{}.
That process has actually already begun with Go 1.19's sync/atomic.Pointer[T]. See https://pkg.go.dev/sync/atomic@master#Pointer https://pkg.go.dev/sync/atomic@master#Pointer. Things like easier non-blocking send and receive or easier fan-in and fan-out channels should probably follow suit.