It is an example. The point is that if you do expensive things to produce the arguments of a log call, the fact that the log function is a no-op does not help with performance. In such cases you need the if. The example is there to demonstrate the if.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It is an example. The point is that if you do expensive things to produce the arguments of a log call, the fact that the log function is a no-op does not help with performance. In such cases you need the if. The example is there to demonstrate the if.