Hardcoded types are to generic code what magic constants are to regular code. (A. Alexandrescu)…