News for hackers. Stuff that matters.
Re:Go Is a Well-Designed Language by gr3ml1n on Friday January 31, 2025 @02:50AM (#42885497)
I can think of situations where all four make sense. Not sure what you mean?

result+no error: data returned, no error happened. - Typical function call where you want some data.

no Result+error: nothing to return, error happened. - That typical call failed.

result+error: partial result, up to error. - Wrote x bytes to disk, then ran out of space.

no result+no error: nothing to return, no error. - Data for a passed query. Nothing came back, but that's not an error.

Re:Go Is a Well-Designed Language by nejsjsjsbsb on Friday January 31, 2025 @03:00AM (#42885547)
But not every situation. Make illegal state unreprestable is a good ideal.