3 ms·
I don't think this is a real difference. You can make the exact same API design mistakes regardless of which error delivery mechanism you use. The important th
by fauigerzigerk 7y ago
I don't think this is a real difference. You can make the exact same API design mistakes regardless of which error delivery mechanism you use.
The important thing is for the API designer to think about the abstractions, i.e which types of errors should be part of the API and which errors are just implementation details that may change.
If the API designer is too lazy to put enough thought into that then the result will always be what you are ascribing to Java.
- oehpr 7y agoThere is always an onus on an API designer creating an API to express it well. However I think the difference between good vs bad language (and a good vs bad API come to think of it) is that it makes doing the right thing easy (lazy), and the wrong thing hard. I think about this when I think about GraphQL. I like GraphQL, I really do, but GraphQL's N+1 problem is why I don't recommend it. The easy thing is to hammer the heck out of your database, the hard things is to parse the GraphQL request and correctly transform it into a SQL statement. I just don't trust everyone on the dev team to not be lazy.
- fauigerzigerk 7y agoI agree with the principle, but in this case it seems very easy to do the right thing in either language once you have done the hard work of designing a good API. The same goes for doing the wrong thing.
- afiori 7y agoI do not know much about java, but I think that the part about automatic conversion on passing errors is not available in java.