Questions tagged [type-safety]
The type-safety tag has no usage guidance.
3
questions
15
votes
5
answers
2k
views
When can widening conversions cause problems?
I can understand the reason for raising a warning or error when you try to convert a wider integer type to a narrower one, due to the loss of precision.
Some C compilers will warn about this:
...
9
votes
4
answers
2k
views
What are the approaches of protecting against partially initialized objects?
An object is partially initialized if the program execution didn't exit their constructor yet. Usually the programmer is responsible for not leaving partially initialized objects in unwanted places ...
-7
votes
3
answers
434
views
What's the point of type safety? [closed]
It has been advertised that in type-safe languages, well-typed programs never go wrong, but this doesn't like a legit statement to me:
Array indexing is usually by int, but we can freely send out of ...