3 ms·
To me, the problem is that Go returns two values which makes it hard to compose functions.
by eweise 3y ago
To me, the problem is that Go returns two values which makes it hard to compose functions.
- sambeau 3y agoThat's deliberate to stop you trying to compose functions that return errors. You should be explicitly handling the errors before you compose.
- eweise 3y agogreat, except 99% of the time I want to handle the error by bubbling it up to a top level routine. From my experience, "handling" the error means wrapping it in another error and returning, which is what you get from other languages for free.