Using “Base” in a Class Name

前端 未结 13 2114
旧巷少年郎
旧巷少年郎 2020-12-30 21:07

Is it acceptable to use the word \'Base\' in a class name which is a the bottom of the inheritance tree?

I have always found this a bit of a cop-out, just wondering

13条回答
  •  心在旅途
    2020-12-30 21:50

    I side with "no" for exactly the refactoring reason you've cited.

    A class should be named after what it logically represents, and nothing but the Object class is really really Base. Metaphysics ftw :)


    re: Option B, there is nothing confusing about

    namespace MySpecificNamespace
    {
      MyClass: MyCommonNamespace.MyClass
      {
      }
    }
    

提交回复
热议问题