Having a type defined allows the compiler to help with type safety. For example we can use it in switches to trigger a warning when a new object type is added but not covered by the switch yet (but probably should).
Having a type defined allows the compiler to help with type safety. For example we can use it in switches to trigger a warning when a new object type is added but not covered by the switch yet (but probably should).