Namespace Rule of Thumb

前端 未结 5 629
暖寄归人
暖寄归人 2021-01-05 08:29

Is there a general rule of thumb as to how many classes, interfaces etc should go in to a given name space before the items should be further classfied in to a new name spac

5条回答
  •  迷失自我
    2021-01-05 09:23

    It is generally considered bad form to have a small number of classes in a namespace. I have always attributed this to the fact that many namespaces leads to confusion.

    I would suggest that you break the classes into logical namespaces being as reasonable and practical as possible. However if you end up with only one or two classes per namespace then you might be fracturing too much and should think about consolidating.

提交回复
热议问题