Why avoid subtyping?

前端 未结 8 947
长发绾君心
长发绾君心 2020-12-02 07:55

I have seen many people in the Scala community advise on avoiding subtyping \"like a plague\". What are the various reasons against the use of subtyping? What are the altern

8条回答
  •  再見小時候
    2020-12-02 08:08

    I think lots of Scala programmers are former Java programmers. They are used to think in term of Object Oriented subtyping and they should be able to easily find OO-like solution for most problems. But Functional Programing is a new paradigm to discover, so people ask for a different kind of solutions.

提交回复
热议问题