News for hackers. Stuff that matters.
Re:Building a Streaming Platform in Go for Postgres by treyd on Monday November 06, 2023 @09:05PM (#38172253)
That's not at all what I was referring to. It's not merely having channels as function arguments. Channels broadly have footguns around how closed and nil channels are treated and you can run into work contention/starvation issues accidentally, since they do have their own throughput limits. And wrapping them in your own handle types that's specific to the library's use case allows you to deal with those issues and swap out the implementation of the cross-goroutine bits without breaking the downstream API.
Re:Building a Streaming Platform in Go for Postgres by kitd on Tuesday November 07, 2023 @05:09AM (#38175128)
Channels broadly have footguns around how closed and nil channels are treated

I appreciate your concerns but one could say similar things about nil pointers or accessing slices out of range. Anything you use should be handled with care.