One of the fundamental rules that people should follow as programmers is to assume that they are terrible at it, and that means offloading risky stuff to either the language (preferably) or a standard library (if the language doesn’t have built-in support) where possible.

References: