Github user astitcher commented on the pull request:
https://github.com/apache/qpid-proton/pull/39#issuecomment-119227983
@dcristoloveanu - Sorry not to reply to your comments - for some reason I
got no email to tell me you had commented.
* If you change the PR I'll be happy to merge it.
* I was peripherally aware that some coding standards require single return
points. And if you'd pressed me I might have guessed the MISRA standard. I do
agree with the rationale, however I think it is just guidance, and as
professionals we are supposed to use our best judgement. In this and similar
cases I think that the single return actually makes the code harder to read and
therefore maintain. So even in coding to this standard I'd argue that in these
cases early exit is better.
* I think you may be misinterpreting the idea of exception like semantics.
I'm not suggesting that the entire program abort (I'm not sure why exception
would indicate that). In all the language that I'm familiar with exception
indicates a non-local flow of control which avoids having to deal with bad
consequences in a place that probably doesn't have the global knowledge to do
this. Think of C++, Java, Python, C#, F#, etc. exceptions.
However it is most likely true that if you run out of memory in the context
of Proton then the current connection can not continue.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---