News for hackers. Stuff that matters.
Re:Conc: Better Structured Concurrency for Go by mappu on Wednesday January 11, 2023 @09:24PM (#34348338)
Is this really the case? Can you link to anything or an example on go.dev/play/ ?

I can find a mention of "cmp.Equal" having that behavior, but that's just a third-party package panic.

Re:Conc: Better Structured Concurrency for Go by assbuttbuttass on Wednesday January 11, 2023 @09:59PM (#34348598)
It's true, but you'd never really write code like this

https://go.dev/play/p/r9NkQb6bQTx

Re:Conc: Better Structured Concurrency for Go by erik_seaberg on Wednesday January 11, 2023 @10:43PM (#34348915)
The problem also affects structs that happen to have a private callback or cache anywhere within.
Re:Conc: Better Structured Concurrency for Go by preseinger on Thursday January 12, 2023 @06:30PM (#34361781)
Obviously `interface{}` values are not comparable?
Re:Conc: Better Structured Concurrency for Go by erik_seaberg on Thursday January 12, 2023 @08:48PM (#34362953)
The comparison is explicitly allowed in the language spec, there’s no warning for doing it, and it often works depending on the types. It’s a data-dependent runtime error, which is usually hard to guarantee test coverage for.