While you are using trace for debugging purposes, you should be fine. As a rule, just assume that the final version of the finished version of your program will not have trace .
You will never see segfaults from trace . Its “insecurity” is due to the fact that it introduces observable effects into clean code. For example, in STM, when a transaction retries, its effects are considered rollback. If trace was used to send a message to the user, you cannot drop it. If the trace output triggers a rocket launch, you will have to deal with international side effects. If trace instead simply signals the developer that “FYI, the code is executing X”, this is not part of the core logic of the program, and it’s fine.
chi
source share