Mixin vs inheritance

前端 未结 9 979
梦毁少年i
梦毁少年i 2020-12-02 07:22

What is the difference between a mixin and inheritance?

9条回答
  •  情歌与酒
    2020-12-02 08:08

    mix-in is a specific, restricted case of (multiple) inheritance used for implementation purposes; some languages (e.g. Ruby) support it without supporting generalized multiple inheritance.

提交回复
热议问题