Dynamic dispatch in Haskell

后端 未结 4 743
孤独总比滥情好
孤独总比滥情好 2020-12-22 19:40

Programs written in, for example, Java rely a lot on dynamic dispatch.

How are such programs expressed in functional languages such as Haskell?

In other word

4条回答
  •  粉色の甜心
    2020-12-22 19:47

    Ad-hoc polymorphism is done via typeclasses. More OOP-like DD is emulated with existential types.

提交回复
热议问题