<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 4/29/2020 12:57 AM, Luciano Notarfrancesco via Cuis-dev wrote:
<blockquote
cite="mid:CAL5GDyqrW-RgaYhCcDa0XMLxgUCCdwEmrGd5k0fbMkmcJoAm2g@mail.gmail.com"
type="cite">
<div><br>
</div>
<div><br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, 28 Apr 2020 at 8:52
PM, Juan Vuletich <<a moz-do-not-send="true"
href="mailto:juan@jvuletich.org">juan@jvuletich.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;"><br>
Without backticks, we'd need to add packages as globals, so
they can be <br>
resolved at runtime. With the backticks we can avoid that,
because we <br>
can give the Compiler the context to resolve package names
if in a <br>
required package, just like class names, at compile time.<br>
</blockquote>
<div dir="auto">
<div dir="auto" style="font-size: 1rem; color: rgb(49, 49,
49); word-spacing: 1px;"><br>
</div>
<div dir="auto" style="font-size: 1rem; color: rgb(49, 49,
49); word-spacing: 1px;">But that would work regardless of
back ticks, right? Erik doesn’t like backticks very much,
I also avoid them in my code.</div>
<div dir="auto" style="font-size: 16px; color: rgb(49, 49,
49); word-spacing: 1px;"><br>
</div>
<div dir="auto" style="font-size: 1rem; color: rgb(49, 49,
49); word-spacing: 1px;">I just did some experiments
changing Class>>bindingOf:. Currently it first looks
in class var names and SharedPools calling
localBindingOf:, then it looks in globals by calling
Smalltalk bindingOf:. I added a packageBindingOf: after
localBindingOf:, and if self package is not nil it tries
to resolve the binding within the package. We can put
required packages here and they will look like globals,
right? And also resolve classes of the local package.</div>
</div>
</div>
</div>
</blockquote>
<br>
You are right! Yes, the backticks are optional. There is still the
message send to get the class. So there is some performance penalty,
and some users in critical code might still prefer to use them, so
the literal is the class and not the module. But it is a small
detail.<br>
<br>
<blockquote
cite="mid:CAL5GDyqrW-RgaYhCcDa0XMLxgUCCdwEmrGd5k0fbMkmcJoAm2g@mail.gmail.com"
type="cite">
<div>
<div class="gmail_quote">
<div dir="auto">
<div dir="auto" style="font-size: 1rem; color: rgb(49, 49,
49); word-spacing: 1px;">I tried one of the ideas: keeping
all classes global, but adding a prefix like
‘PackageName.’ to the binding key in the Smalltalk system
dictionary. I added a Class>>globalName too. Seems
to almost work, but tools break all over the place.</div>
</div>
<div dir="auto"><br>
</div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;"><br>
</blockquote>
</div>
</div>
</blockquote>
<br>
Cheers,<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org">www.cuis-smalltalk.org</a>
<a class="moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a class="moz-txt-link-freetext" href="https://github.com/jvuletich">https://github.com/jvuletich</a>
<a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
@JuanVuletich</pre>
</body>
</html>