3 ms·
> A web service is not a device driver where every edge case has to be carefully considered. Yikes, that's an assumption that is going to bite you hard in your
by fixermark 11y ago
> A web service is not a device driver where every edge case has to be carefully considered.
Yikes, that's an assumption that is going to bite you hard in your career. I recommend escaping it as soon as possible. ;) The web is full of horror stories from people who assumed their part of a web-accessible product wasn't on a critical security / safety / reliability path.
I used to use Python and Ruby on Rails for web services; this is precisely why I left them. I got tired of dealing with typos becoming runtime exceptions.
> Bailing out with an exception is fine. Go disagrees.
Go makes it trivial to bail out with an exception: You panic. But panic is reserved for real exceptions, not common and expectable situations (like "file not found") and its defaults are therefore set to crash the whole process (which is fine if you're doing microservices and therefore can handle failures by crashing and restarting). I find other languages treat exceptions as not sufficiently exceptional.
- fidz 11y ago> I used to use Python and Ruby on Rails for web services; this is precisely why I left them. I got tired of dealing with typos becoming runtime exceptions. That is why you must do 100% code coverage on all non-compiled language.