[Cuis-dev] recommendations for class name prefixes

Juan Vuletich juan at cuis.st
Sat Jun 22 15:58:09 PDT 2024


On 6/20/2024 2:19 AM, Luciano Notarfrancesco via Cuis-dev wrote:
> It’s up to you. I don’t do it, and i think most people in Cuis dont do 
> it either (perhaps becase Cuis is smaller than other Smalltalks, so 
> it’s less prone to name clashes).
>
> On Thu, Jun 20, 2024 at 06:39 Mark Volkmann via Cuis-dev 
> <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
>
>     From what I understand it is standard practice to add a prefix
>     your classes to avoid name conflicts with classes from other
>     packages. Is it recommended to do this for every class you define?
>     Are there guidelines on choosing prefixes such as their length
>     (2?) and case (all uppercase?) ? Is there a list of well known
>     prefixes used by popular packages that we should avoid using in
>     our own class names?
>
>     ---
>     R. Mark Volkmann
>     Object Computing, Inc.
>     -- 
>     Cuis-dev mailing list
>     Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
>     https://lists.cuis.st/mailman/listinfo/cuis-dev
>

The question is: why do names clash? I can think of two reasons:
- Duplicated concepts. A redesign is in order. Each concept should 
appear once.
- Names are too generic. Things that are not the same are named the 
same. Renaming is in order to clarify.

The only times I had names clashing, and I still wanted them to coexist 
was during merge of different codebases. For that, a rename with some 
prefix is appropriate. Any prefix would do. It should be as short lived 
as possible.

HTH,

-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240622/e3a4935e/attachment.htm>


More information about the Cuis-dev mailing list