News for hackers. Stuff that matters.
Re:From zero to Go: launching on the Google homepage in 24 h... by masklinn on Wednesday December 14, 2011 @07:04AM (#3351512)
> The entire reason Go has multiple return values for functions (such as paths and err in this case) is to avoid having to encode errors in the "real" function result.

That's nonsense, MRVs are tuples (conceptually, Go implemented them with special syntax because... well, it's Go so it could not go with the general principle now could it?), so Go very specifically encodes errors in the function result.

And using a sum type would encode the error in the type, not in the result itself.

Re:From zero to Go: launching on the Google homepage in 24 h... by 4ad on Wednesday December 14, 2011 @12:31PM (#3352690)
Multiple return values are not tuples, Go doesn't have tuples in the type system.
Re:From zero to Go: launching on the Google homepage in 24 h... by masklinn on Wednesday December 14, 2011 @04:56PM (#3353818)
> Multiple return values are not tuples

Multiple return values are a special case of tuples. Hence the "conceptually" part.

> Go doesn't have tuples in the type system.

Could you explain how you managed to completely miss the part where I say exactly that?