Are type fields pure evil?

后端 未结 9 1329
旧巷少年郎
旧巷少年郎 2021-02-06 16:27

As discusses in The c++ Programming Language 3rd Edition in section 12.2.5, type fields tend to create code that is less versatile, error-prone, less intuitive, and less maintai

9条回答
  •  别跟我提以往
    2021-02-06 16:55

    I don't know of any realistic examples. Contrived ones would depend on there being some good reason that virtual methods cannot be used.

提交回复
热议问题