Skip to content

Debugging functions should throw warnings

The function Debug.Trace.trace is useful for debugging, however, we don't want this function to be present in production code. An excerpt from Debug.Trace explains why:

The 'trace' function should /only/ be used for debugging, or for monitoring
execution. The function is not referentially transparent: its type indicates
that it is a pure function but it has the side effect of outputting the
trace message.

It would be useful if the compiler threw warnings when such functions are used.

Trac metadata
Trac field Value
Version 8.0.1
Type Task
TypeOfFailure OtherFailure
Priority lowest
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information