Pragmatic Programmers popularized the DRY principle: don't repeat yourself. This also applies to naming. Reusing the same area or prefix names again and again does not add more information, it just makes the names longer, less readable, more frivolous and more difficult to find. If you have 100 class names starting with PreferredLocation* , it will be difficult for you to find the correct option: - (
Therefore, I am completely against it. The names of classes and methods are limited to nested names of paths / projects (in java, which would be package , in C # I do not know what the correct term is), so if you need all the information about the location of the class / method, just look at its full name. However, in normal code, you cannot always use the full name. The only exception is a clash of names, but I believe that this should be seen as an exception, not a rule.
In addition, in a well-developed application, most methods / classes are not displayed globally, only inside their respective package (where the programming language allows it - Java, I'm sure C # too). This reduces the risk of name conflicts and eliminates the need for class name prefixes even further.
source share