4 ms·
Or people will simply elect to use unchecked exceptions, and users will see stack traces frequently. In either case, Go programs don't seem to suffer from bugs
by weberc2 10y ago
Or people will simply elect to use unchecked exceptions, and users will see stack traces frequently. In either case, Go programs don't seem to suffer from bugs in the error handling paths like Java and friends. YMMV.
I don't see the value in a clean happy path and a hidden error path.
- stouset 10y ago> Or people will simply elect to use unchecked exceptions Go already has unchecked exceptions. It's called "panic".
- weberc2 10y agoOk? How does that relate to the discussion? What point are you intending to make?
- stouset 10y agoIt completely invalidates your argument. Your argument is that an error-handling system as described would be undesirable because it would result in developers misusing unchecked exceptions. Go already has unchecked exceptions in the form of `panic`. So either developers are already abusing it, in which case go's current error-handling approach is no better than the one proposed according to your metric. Or developers have access to it but aren't abusing it, in which case there's no reason to expect they'd abuse it in a system where doing it the right way is even easier than it is today. In my experience, users already do experience stack traces as it's embarrassingly easy to accidentally operate on a nil pointer.
- weberc2 10y agoI'm not sure whose argument that is, but it's not mine.