<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 href="mailto:juan@jvuletich.org">juan@jvuletich.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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 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 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br></blockquote></div></div>