<div dir="ltr">As a newcomer to Smalltalk, but with many years of experience in lots of other languages, my main concern is that I will encounter name conflicts when using packages written by others if I don't add a prefix to my classes. But perhaps that isn't as likely as I'm thinking. I wonder if the situation is different if I'm creating a library of classes that I expect many others to use. Is there a consensus that name prefixes are more important for such libraries?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 22, 2024 at 5:58 PM Juan Vuletich <<a href="mailto:juan@cuis.st">juan@cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><u></u>
<div bgcolor="#ffffff">
On 6/20/2024 2:19 AM, Luciano Notarfrancesco via Cuis-dev wrote:
<blockquote type="cite">
<div>
<div dir="auto">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).</div>
</div>
<div>
<div><br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Jun 20, 2024 at
06:39 Mark Volkmann via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">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?<br>
<br>
---<br>
R. Mark Volkmann<br>
Object Computing, Inc.<br>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote>
</div>
</div>
</div>
</blockquote>
<br>
The question is: why do names clash? I can think of two reasons:<br>
- Duplicated concepts. A redesign is in order. Each concept should
appear once.<br>
- Names are too generic. Things that are not the same are named the
same. Renaming is in order to clarify.<br>
<br>
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.<br>
<br>
HTH,<br>
<pre cols="72">--
Juan Vuletich
<a href="http://cuis.st" target="_blank">cuis.st</a>
<a href="http://github.com/jvuletich" target="_blank">github.com/jvuletich</a>
<a href="http://researchgate.net/profile/Juan-Vuletich" target="_blank">researchgate.net/profile/Juan-Vuletich</a>
<a href="http://independent.academia.edu/JuanVuletich" target="_blank">independent.academia.edu/JuanVuletich</a>
<a href="http://patents.justia.com/inventor/juan-manuel-vuletich" target="_blank">patents.justia.com/inventor/juan-manuel-vuletich</a>
<a href="http://linkedin.com/in/juan-vuletich-75611b3" target="_blank">linkedin.com/in/juan-vuletich-75611b3</a>
<a href="http://twitter.com/JuanVuletich" target="_blank">twitter.com/JuanVuletich</a></pre>
</div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><font face="arial, helvetica, sans-serif">R. Mark Volkmann</font></div><div><span style="font-size:12.8px"><font face="arial, helvetica, sans-serif">Object Computing, Inc.</font></span></div></div></div></div></div></div></div></div>