type-systems
how to make a collection of type objects in Scala
Basically, I want to have a Map indexed by type objects. In this case, I\'m trying to use Class as the \"type type\".[详细]
2023-04-10 08:17 分类:问答How to hint types when compiling with llvm-gcc?
In some C code, I\'m defining a simple static array as a function argument, say: void foo(float color[3]);[详细]
2023-04-08 02:53 分类:问答For Scala are there any advantages to type erasure?
I\'ve been hearing a lot about different JVM languages, still in vaporware mode, that propose to implement reification somehow. I have this nagging half-remembered (or wholly imagined, don\'t know whi[详细]
2023-03-26 14:35 分类:问答Is it possible to place inequality constraints on haskell type variables?
Is it possible to place an inequality constraint on the typevariables of a function, à la foo :: (a ~ b) => a -> b as in GHC type family docs, except inequality rather than equality?[详细]
2023-03-25 15:47 分类:问答How do you explicitly specify a parameterized type for an existential type in Scala?
In Pro开发者_JAVA技巧gramming in Scala, the following example is given to show how to reference a Java class with wildcards.The method javaSet2ScalaSet takes a type T.Typically, you can always explici[详细]
2023-03-20 16:59 分类:问答Why does one select Scala type members with a hash instead of a dot?
In Scala, the syntax for selecting a type from a class is different from that of selecting anything else from a class. In that the former uses a hash as the selection operator instead of a dot. Why is[详细]
2023-03-20 03:21 分类:问答Why is enum casting allowed even when there is no valid value defined in the enumeration
When reading Jon Skeet\'s answer to this particular question How can I make it so my开发者_如何学编程 class variables can only be set to one of three choices? y learned something new I was not aware o[详细]
2023-03-19 22:18 分类:问答Is there any static language in which a class is an object?
There are quite a few dynamically typed object oriented languages in which a class itself is an object. Smalltalk, and Python for example. Is there any statically typed language in which a class is an[详细]
2023-03-17 02:35 分类:问答Is there a language where types can take content of fields into account?
I had this crazy idea and was wondering if such a thing exists: Usually, in a strongly typed language, types are mainly concerned with memory layout, or membership to an abstract \'class\'.So class F[详细]
2023-03-10 13:49 分类:问答Numeric type signature
Is it possible to create a type with a numeric argument? i.e. if I want to create a type of integers with a fixed bit-width:[详细]
2023-03-10 04:59 分类:问答