Progreamming and type safety

All code are built into something that the machine can run, some are compiled while others are built when you run it and some are in the middle. A C or C++ program is compiled while a Python program isn't and C# and Java are in between.

Some langauges are statically typed while others are dynamic. Most of the static ones also allow you to code in a dynamic way.

This is about what type safety is. This is not about "security" safety, while there are some security benefits to it that is not the main thing.

When you write programs in a static way where you define what types everything has. Like this is a string and this is a custom type with these values with these types you can after the program starts that the basics are correct.

Especially if you use modern features that keep you from passing null to everything. There are still a lot of bugs to fix. But you get rid of most null reference and fields not being present in object type problems.

The main safety it gives you is that a lot of problems can be discovered without testing the program.