I think it's pretty clear that you can minimize the size of either a sum type or a non-sum type by using pointers rather than values, as you pointed out. But, obviously, Go supports returning values, not just pointers. In that case, Go will have to allocate space for the maximum-sized component of the value type, which could be arbitrarily large. This is a non-obvious fact unless you're a language implementor, or just really interested in the implementation. This somewhat violates the concept that the performance costs of code should be clear.
This is less of an issue in languages like Java that do not have value types. When everything is a pointer, all of the elements of the sum type have the same size (or at least, a size less than 8 bytes, in the case of primitives). This may not be the only, or even the best reason for not implementing them, but it's still something to consider.
It's true that sum types can be more space-efficient than using nullable struct members like my example did. But this mainly seems like an issue when you have more than two types in the sum type, which seems to come up very rarely. The difference between returning two 8-byte pointers and returning a type tag and an 8-byte pointer is not a big deal on a 64-bit machine. You are using 2 64-bit registers in any case. Maybe there's cases I haven't thought of, but at first glance, the efficiency argument for sum types seems very weak.
[Variant types are] alluded to in the FAQ:
Thanks! I didn't see that before. Interesting.
http://golang.org/doc/faq#variant_types
"We considered adding variant types to Go, but after discussion decided to leave them out because they overlap in confusing ways with interfaces. What would happen if the elements of a variant type were themselves interfaces? "
I would be interested to read the original discussion, if it was carried out via publicly accessible mailing lists.
I don't think this would warrant much concern. To use your own example, emulating sum types via a tuple of `(foo, bar)` where both `foo` and `bar` are nil-able implies that they are interfaces (or pointers), which (AFAICT) means that the return type of your function is always going to be the size of two pointers at runtime (16 bytes on a 64-bit platform). If you replaced that with an actual sum type, the runtime representation would consist of a single pointer and a tag, which would be between 9 and 16 bytes (depending on padding and alignment), so even in the worst case it's no more wasteful than the tuple approach. Additionally, using tuples here, every time that you add another potential variant (i.e. `(foo, bar, baz, qux)`) you inflate the size of the return type by another eight bytes, whereas the sum type scales gracefully without getting larger. And if you're worried about a sum type where one of the variants is some huge struct, then you're free to store a pointer to an instance of that struct instead, in which case your runtime size is, again, no worse than 16 bytes (assuming all the other variants aren't huge structs as well), and it's not like this introduces any greater runtime efficiency than the tuple approach given that interfaces already (again, AFAICT) demand a pointer indirection.(I'm not an expert on Go though, I could be wrong! Corrections welcome!)