Hi everyone, I was working on a project and for simplicity reasons I just happened to write a lot of useless, effectless conditions. What I mean by "useless, effectless condition" is a condition that makes no function call, that has no body, and that makes no assignment of any variable outside the scope of the condition. For example, an example of my code would be:
if tracer.detailLevel & macros.TraceDetailLevelMostPossible != 0 {} Such function could be removed without affecting the execution of the program, algorithmically speaking. Moreover, it seems to me it might be possible to define a relatively small set of rules that identifies such constructs and only those. However when I googled it, I didn't find anything that would answer my question. So here it is: Is such a condition eliminated at compile-time? Thx in advance ! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CANgi337sgmcTNsrrHLdYNWRae60XKwuy-_EO_%2BWHQZCJo-dXig%40mail.gmail.com.