2 ms·
Many compiled languages with strict type checking still have various sorts of "unsafe" type coercions for when you think you know better than the compiler (thin
by WorldMaker 4y ago
Many compiled languages with strict type checking still have various sorts of "unsafe" type coercions for when you think you know better than the compiler (things like structs that have the same layout but are still nominally different types). In many of those languages the goal is that you need to opt in to the unsafe type coercion sometimes literally with a language keyword even named something like "unsafe" and know that you are doing something dangerous up front, in direct contrast to a language like C/C++ asking you to opt in to type safety and not doing anything about it up front unless you ask.