[Cuis-dev] Naming conventions

Mariano Montone marianomontone at gmail.com
Mon Apr 27 08:22:34 PDT 2020


El 27/4/20 a las 12:13, ken.dickey--- via Cuis-dev escribió:
> On 2020-04-27 07:28, Erik Stel via Cuis-dev wrote:
>> Hi,
>>
>> Short question:
>> Also using Pharo, I’m used to creating classes with prefixed names
>> because of possible name collisions. What is the Cuis take on these
>> prefixes? I do not see any prefixes being used in the
>> packages/features I’m using at the moment.
>>
>> Regards,
>> Erik
> 
> Examples?

For example, Seaside uses 'WA' prefix for its classes, like:
WAHtmlCanvas, WAAuthConfiguration, etc.

> 
> Note that the base Cuis image typically has between 500 and 600 classes.
>  The latest Pharo base image has over 9000 classes.  Perhaps the
> (pre)fix is for a Pharo problem..

Maybe it is the number of classes, but also the probability of
collision. Say you have a class 'User' in your application, it is quite
likely other packages may want to use that too. So, a prefix would be
the solution at the moment. I use prefixes for some of my packages.

Cheers,

Mariano



More information about the Cuis-dev mailing list