News for hackers. Stuff that matters.
Re:Union types ('enum types') would be complicated in Go by eru on Saturday December 07, 2024 @04:13AM (#42348390)
You also want to support having the same type on both sides:

    var foo interface {
        struct { A string } | struct { B string }
    }
Eg in Rust that would be 'Result<String, String>', where your success happens to be a String and your errors happens to be a String error message.

There are no comments on this comment yet.