Prev | Current Page 357 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

The problem is, you must now comment out each line of code where these function calls
take place. And, even if you provide a method to omit these messages, your code will still be bloated
with all the unused debug code floating uselessly in your release file. The - - no - traces compiler
directive, on the other hand, ensures that all trace code is not compiled at all, leaving your release file
as slimline as you can possibly make it, without having to alter a single line of code. Now that ??™ s cool!
The - - no - traces compiler switch will only exclude calls to the standard trace function from compilation.
All calls directly to the haxe.Log.trace function will still be compiled as normal. This is why
we consider the haXe trace function near perfect.
Exceptions
Exceptions are often misunderstood, and many developers consider exceptions as errors in their code
that they can recover from. Now, depending on your capabilities as a programmer, this might very well
be the case. However, you know from the first part of this chapter how to find bugs in your code and
remove them, so why handle them twice?
Take a look at this from another perspective.


Pages:
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369