[squeak-dev] Unloading Traits
Tobias Pape
Das.Linux at gmx.de
Thu Aug 8 07:47:44 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 08.08.2013 um 09:38 schrieb Frank Shearar <frank.shearar at gmail.com>:
On 7 August 2013 22:51, Tobias Pape <Das.Linux at gmx.de> wrote:
Am 07.08.2013 um 23:04 schrieb Frank Shearar <frank.shearar at gmail.com>:
In my exploration of the interface between Traits and Monticello, I
found that Trait class >> #unloadTraits depends on Monticello.
This is unfortunate, because Traits should be a much lower level
package than Monticello.
Au contraire. It’s a languae feature, yes, but so is AspectS or OMeta..
Traits are nice and such but just because it provides language instead of library, it
shouldn’t be more privileged.
Well, I don't know what privilege means here. What I do know is that
Traits depends on a very small number of packages, and provides a low
level feature / language extension. Monticello does neither. (This is
fine and good and proper. I'm not saying either is more important.)
These methods are very definitely Monticello methods; they make no
sense to the Traits package in the absense of Monticello.
I ran a little experiment last night, and pulled these methods out
into a MonticelloForTraits package. We end up with this kind of
structure:
digraph {
MonticelloForTraits -> Traits
MonticelloForTraits -> Monticello
}
In other words, this makes Traits cleanly unloadable (just that an
unload script must unload possibly (*) two packages), and keeps Traits
clean. The only cost is an extra small, highly specific package.
I would like that more :)
Best
-Tobias
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
iEYEARECAAYFAlIDTScACgkQcPVIrP6PLKu62gCeMuHluEgGa2amjar1XmbGSbDD
GnsAn3ewqJVaaz4vUK/Ahduw3OhgBuzP
=nZC7
-----END PGP SIGNATURE-----
More information about the Squeak-dev
mailing list
|