Agreed, but this would help force developers to deal with treating secrets with the care they should have been treating them with all along, in my opinion.
PowerShell's [SecureString] type is something of a step in the right direction, although its execution is lacking in some respects.
In any case, stack traces should _always_ be treated as secrets.