2 ms·
> The concept that a function can fail is pretty fundamental Not at all. This is a grave misunderstanding of computing. Functions fundamentally can't fail. The
by randomdata 4y ago
> The concept that a function can fail is pretty fundamental
Not at all. This is a grave misunderstanding of computing. Functions fundamentally can't fail. They can only enter different states. Only under exceptional circumstances, like the programmer screwed up or the machine is literally on fire, could they fail.
Indeed, Go does provide a method for dealing with exceptional circumstances (what we often call exceptions for short). See: panic/recover.