Top "Type-safety" questions

Type safety is the extent to which a language discourages using variables in an unsafe manner, according to the variables' type.

What is type safety and what are the "type safe" alternatives?

Possible Duplicates: What is Type-safe? What is type-safety? I was reading about c++ vectors and it was mentioned that memcpy …

c++ c type-safety
Which Typesafe Enum in C++ Are You Using?

It is common knowledge that built-in enums in C++ are not typesafe. I was wondering which classes implementing typesafe enums …

design-patterns enums enumeration type-safety c++03
Java N-Tuple implementation

I just made a Java n-tuple which is type-safe. I'm using some unconventional methods to achieve type-safety (I just made …

java tuples type-safety
JComboBox is a raw type. References to generic type JComboBox<E> should be parameterized

String[] boxOptions = {"1","2","4","8","16","20","40","100","400"}; JComboBox box = new JComboBox(boxOptions); I had these exact lines of code in my program before, and wasn't …

java generics parameterized type-safety
How to make Databinding type safe and support refactoring?

When I wish to bind a control to a property of my object, I have to provide the name of …

c# .net data-binding refactoring type-safety
let Gson throw exceptions on wrong types

I use Gson inside my projects to deserialize JSON-Strings to Java-Objects. If I do a request, I expect a well-defined …

java json gson type-safety
Is Python type safe?

According to Wikipedia Computer scientists consider a language "type-safe" if it does not allow operations or conversions that violate the …

python types type-safety dynamic-typing memory-safety
Creating generic array in Java via unchecked type-cast

If I have a generic class Foo<Bar>, I am not allowed to create an array as follows: …

java arrays generics casting type-safety
Overriding "equals" method: how to figure out the type of the parameter?

I'm trying to override equals method for a parameterized class. @Override public boolean equals(Object obj) { if (this == obj) return …

java generics type-safety
Type safety in Python

I've defined a Vector class which has three property variables: x, y and z. Coordinates have to be real numbers, …

python type-safety