News for hackers. Stuff that matters.
Re:New case studies about Google’s use of Go by mjevans on Thursday August 27, 2020 @04:28PM (#24298265)
The use of an Interface type in Go is a good sign that either the data or the logic flow isn't optimized for static analysis and optimizations.

The most common case I happen to have run across is the result of parsing data or configuration files; situations where there might be structure, but all of it is optional.

PS: Your "algebraic data types / sum types" sounds very much like interface composition, a ReaderWriter ( E.G. https://golang.org/pkg/io/#ReadWriter ) for example composes interface types.

Re:New case studies about Google’s use of Go by c-cube on Thursday August 27, 2020 @05:20PM (#24298817)
This is a product, not a sum. It's just a pair of Reader and Writer. Sum types would also give you the ability to say "reader or writer" and use pattern matching to find out which one you were given.

C-like languages traditionally give only the 'product' half of types (C also gives union but they're super low level, and Go just eschewed them). A _modern_ language would give both products and sums.

Re:New case studies about Google’s use of Go by pkolaczk on Friday August 28, 2020 @01:59AM (#24301782)
Interface composition is product of types, not sum.