<div dir="ltr">I think it is because the repetition of `if (auto EC = ...) return EC` is a natural consequence of the introduction of Error class. The class requires explicit error handling everywhere. (This reminds me of the way how errors are handled in the Go language. We can use multiple return values in Go, so an error and a value are returned as separate values, but we actually do write these repetitions explicitly in Go, and that's recommended.) If it is repeated too many and if we don't like it, Error class should provide some way to mitigate it. I think adding a workaround on client side of the class seems a bit too hacky.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 8, 2016 at 8:19 AM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Is it because there are so many?  Or for a different reason?  There was one case where there were like 15 lines of code jsut to get all the values out of the functions and do the error checking, I found it really hurt the ability to read the code.<div><br></div><div>I do agree that there are too many though.  I'm not a C++ wizard, but if someone can help me figure out how to write them with fewer macros, do you think that would be better?</div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 8, 2016 at 8:06 AM Rui Ueyama <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ruiu added a comment.<br>
<br>
I think I honestly don't like these macros. They indeed reduces amount of code but are hard to read. I prefer the current style (explicitly writing control flow in a plain C++) over the magical macros.<br>
<br>
<br>
<a href="http://reviews.llvm.org/D21128" rel="noreferrer" target="_blank">http://reviews.llvm.org/D21128</a><br>
<br>
<br>
<br>
</blockquote></div>
</div></div></blockquote></div><br></div>