:use for GNU Smalltalk
Commonly, when importing a namespace using shared pool dictionaries, you wonder "why can't I just import this once for my entire namespace?" Well, in the upcoming 3.1, you can.
Eval [PackageLoader fileInPackages: #('Parser' 'NetClients')]
Namespace current: Test [
<import: STInST>
Object subclass: MyTest [
test [^RBParser]
]
<import: NetClients>
MyTest extend [
test2 [^URIResolver]
]
]
This gives you the same capability as defpackage :use in Common Lisp, or from package import * in Python.
If you're not comfortable with the new syntax, you can just send the #import: message to a namespace with the desired pool.
Imports are hierarchically aware, so they are inherited by classes in subspaces. This is also convenient for users of Presource, which exists in NoCandy.Presrc, so you can <import: NoCandy> and then refer to MessageMacro as Presrc.MessageMacro.
This will be in the next release, either 3.0c or 3.1, but you can try it now from Git.
