Question d’entretien chez Envoy

why use typedefs?

Réponse à la question d'entretien

Utilisateur anonyme

20 nov. 2016

I blanked out and blurted out a bad assumption that typedefs used by the compiler to protect type safety. The correct answer I didn't give was: typedefs create aliases to existing types and provide clarity and portability to interface definitions. These are used in C, C++ and Objective-C. For Swift, the same thing can be accomplished with typealiases.