News for hackers. Stuff that matters.
Re:Moving from TypeScript to Rust / WebAssembly by hombre_fatal on Thursday July 09, 2020 @12:19AM (#23776900)
People often demand generics in Go. But I think that actual sum types would be a bigger boon (if I got to choose).

You can basically avoid interface{} in generic Go code with some copy and paste. But you can't really avoid it when you're trying to write code that would be cleaned up by an actual sum type.

Not to commit the predicable sin of comparing Rust to Go any time either is brought up. I just mean to +1 the idea that sum types should actually be a fundamental tool that we can reach for in every language. So weird that it's taking so long to go mainstream, so to speak.

There are no comments on this comment yet.