type-safety
How do you test the type-safetiness of your genericized API?
You can use e.g. JUnit to test the functionality of your library, but how do you test its type-safetiness with regards to generics and wildcards?[详细]
2023-03-18 01:57 分类:问答dynamic_cast to the same type does not check type of object
I am trying to determine whether an object pointed by a T* pointer is truly a T object, or some other, unrelated type. I tried dynamic_cast, however it is less than useless, it returns the pointer its[详细]
2023-03-16 09:39 分类:问答C++ Binding an Index to One Data Structure
Suppose I have two containers of elements: std::vector<std::string> foo = { \"aa\", \"bb\", \"cc\" };[详细]
2023-03-15 02:32 分类:问答How to get rid of downcast using synchronous send with Scala Actors?
Suppose, I send a request to an actor and receive its response synchronously: case class MyRequest() case class MyResponse(data:Any)[详细]
2023-03-13 20:26 分类:问答Type safety in Clojure
I want to ask what sort of type safety languages constructs are there on Clojure? I\'ve read \'Practical Clojure\' from Luke VanderHart and Stuart Sierra several times now, but i still have the disti[详细]
2023-03-12 03:28 分类:问答ASP.NET MVC 3.0 - Why strong-typing Model in a View, if static compilation is not happening?
I\'m actively developing desktop applications, local and network services, some classic ASP.NET, etc., so I\'m used to static compilation and static code analysis. Now that I\'m (finally) learning ASP[详细]
2023-03-10 23:33 分类:问答Total Collections, rejecting collections of types that do not include all possibilities
Let\'s say we have the following types: sealed trait T case object Goat extends T case object Monk extends T[详细]
2023-03-10 10:47 分类:问答Using enums for type checking -- how to scope properly
I have a mixture of C++ classes, some of which store a state variable 0..9 as integer, others use \'0\' ... \'9\'.Currently I do:[详细]
2023-03-03 10:03 分类:问答Java: properly checked class instantiation using reflection
I\'m trying to use one of the simplest forms of reflection to create an instance of class: package some.common.prefix;[详细]
2023-02-25 13:54 分类:问答Is VB.NET weakly typed compared to C#
Yesterday I was at an interview where my interviewer (who admittedly didn\'t claim to be an expert on the subject) stated that \"VB.NET is more weakly typed then C#\" - (At the same time he couldn\'t[详细]
2023-02-25 04:15 分类:问答