Haskell's algebraic data types

后端 未结 8 2186
我寻月下人不归
我寻月下人不归 2020-12-04 05:10

I\'m trying to fully understand all of Haskell\'s concepts.

In what ways are algebraic data types similar to generic types, e.g., in C# and Java? And how are they di

8条回答
  •  自闭症患者
    2020-12-04 05:43

    old question, but no one's mentioned nullability, which is an important aspect of Algebraic Data Types, perhaps the most important aspect. Since each value most be one of alternatives, exhaustive case-based pattern matching is possible.

提交回复
热议问题