Identical class names in different namespaces

前端 未结 6 1830
无人共我
无人共我 2021-01-11 13:33

I have two different namespaces, with lots of classes with the same name. I believe some code will make it easier to understand:

namespace Print.Pdl.PostScri         


        
6条回答
  •  星月不相逢
    2021-01-11 14:12

    My opinion is you should use a naming scheme reflecting specialization.

    I mean you don't need to think about if it's a prefix, suffix or any other. Just write names that may clearly identify classes.

    Honestly I believe namespacing wouldn't repleace a right class naming scheme, because namespaces are an organizational thing while classes are part of what your program does.

    So, at the end of the day, I'd choice your second option: specialized naming for namespaces and classes.

提交回复
热议问题