You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/08/25 08:44:43 UTC

[GitHub] [arrow] fredgan opened a new pull request #8046: ARROW-9850:[Go] Defer should not be used inside a loop

fredgan opened a new pull request #8046:
URL: https://github.com/apache/arrow/pull/8046


   As is described in the second section in https://blog.learngoprogramming.com/gotchas-of-defer-in-go-1-8d070894cb01
   
   defer inside the loop may cause unforeseen problems.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] fredgan commented on pull request #8046: ARROW-9850:[Go] Defer should not be used inside a loop

Posted by GitBox <gi...@apache.org>.
fredgan commented on pull request #8046:
URL: https://github.com/apache/arrow/pull/8046#issuecomment-681810466


   @sbinet Hi Sebastien,  I concerned about it. But the loop bodies have some return values(error values), so it's not simple to do like this. So I think it 's not worth to do like that.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] sbinet commented on pull request #8046: ARROW-9850:[Go] Defer should not be used inside a loop

Posted by GitBox <gi...@apache.org>.
sbinet commented on pull request #8046:
URL: https://github.com/apache/arrow/pull/8046#issuecomment-683332943


   well, I'd prefer to keep the robustness coming with `defer` to release memory no matter what.
   but ok.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #8046: ARROW-9850:[Go] Defer should not be used inside a loop

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #8046:
URL: https://github.com/apache/arrow/pull/8046#issuecomment-679892653


   https://issues.apache.org/jira/browse/ARROW-9850


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] sbinet closed pull request #8046: ARROW-9850:[Go] Defer should not be used inside a loop

Posted by GitBox <gi...@apache.org>.
sbinet closed pull request #8046:
URL: https://github.com/apache/arrow/pull/8046


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] emkornfield commented on pull request #8046: ARROW-9850:[Go] Defer should not be used inside a loop

Posted by GitBox <gi...@apache.org>.
emkornfield commented on pull request #8046:
URL: https://github.com/apache/arrow/pull/8046#issuecomment-681324037


   @sbinet do you have time to take look?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org