|
|
|
|
|
by RcouF1uZ4gsC
2185 days ago
|
|
> and if you are logging sensitive information you’ll get in trouble. This is one of the areas, where strong types can help you. Have all your sensitive information in separate types from your non-sensitive info. For example, if you store the user's name in a type called SensitiveString, you can write methods/traits/overloads/etc that can either make it a compile time error to log a a value of that type, or log a placeholder - ie "SenstiveInfoHidden*". This also helps ensure that you don't accidentally assign or append sensitive information to a non-sensitive variable. Put the compiler and type system to work for you. |
|