Type safety means that the compiler can check whether you're using the right types. For example, if you're using printf
, you could accidentally crash your program by writing this:
printf("The meaning of life is %s", 42);
because 42 is an integer, not a string.