type-systems
Does D have 'newtype'?
Does D have \'newtype\' (as in Haskell). It\'s a naive question, as I\'m just skimming D, but Google didn\'t turn up anything useful.[详细]
2023-01-13 11:49 分类:问答Is there a programming language where types can be parametrized by values?
Parametrized types such as C++ templates are a nice thing, but most of the time they can only be parametrized by other types.[详细]
2023-01-12 19:55 分类:问答Typedefs and template specialization
Consider this code: typedef int type1; typedef int type2; template <typename> struct some_trait; template <开发者_如何学编程>[详细]
2023-01-10 04:33 分类:问答C#: using type of "self" as generic parameter?
This may seem a bit odd, but I really need to create a workaround for the very complicated duplex - communication - handling in C#, especially to force other developers to observe the DRY - principle.[详细]
2023-01-06 13:13 分类:问答Using Haskell's types to replace assert statements or if checks in other languages
Sorry if the question is very elementary, I am still very new to Haskell. Lets say I have a function that can only work with two numbers that are in the golden ration (1.618), how do I define the type[详细]
2023-01-06 12:57 分类:问答List of existentially quantified values in Haskell
I\'m wondering why this piece of code doesn\'t type-check: {-# LANGUAGE ScopedTypeVariables, Rank2Types, RankNTypes #-}[详细]
2023-01-05 18:38 分类:问答Functional Programming and Type Systems
I have been learning about开发者_Python百科 various functional languages for some time now including Haskell, Scala and Clojure. Haskell has a very strict and well-defined static type system. Scala is[详细]
2023-01-05 05:38 分类:问答HowTo get the class of _ :Any
I\'ve wrapped a Message and would like to log which message I\'ve wrapped. val any :Any = msg.wrappedMsg[详细]
2023-01-04 22:07 分类:问答Are Rank2Types/RankNTypes practical without polytype variables?
Since type variables cannot hold poly-types, it seems that with Rank*Types we cannot re-use existing functions because of their monotype restriction.[详细]
2023-01-03 21:15 分类:问答Extending the .NET type system so the compiler enforces semantic meaning of primitive values in certain cases
I\'m working developing a system right now that deals with lots of conversions between semantically different values that have the same primitive .NET type (double/string/int).This means that it\'s po[详细]
2023-01-01 22:42 分类:问答