[Modules] a summary of joseph's work

Paul McDonough wnchips at yahoo.com
Wed Sep 5 19:14:08 UTC 2001


One quick addendum ...
--- joseph pelrine <jpelrine at balcab.ch> wrote:
[...]
> Paul has all the stuff needed to transfer between
> ChangeSets and 
> Packages. Having used both, I must say that the
> Package format is 
> easier and cleaner to use - no unwanted surprises.
-- it should be noted that the ChangeSet->Package
mapping isn't 100% sure, and (I believe) can't be. 
That's because a ChangeSet will declare things like
Globals and Pools as simple doIts, viz.
  Smalltalk at: #MyNewGlobal put: Dictionary new
or
  Smalltalk at: #MyNewPool put: Dictionary new

Unless someone can point out something I'm missing
about ChangeSets (I do miss things, kind of frequently
it seems ...), there's really no good way to tell the
difference and be sure of it.  So if the mapping thing
sees
  Smalltalk at: #FlibbertyGibbet put: 42
it makes a best guess that FlibbertyGibbet should be
an instance of GlobalVariableDefinition, but if it
sees
  Smalltalk at: #FlibbertyGibbet put: Dictionary new
it will guess PoolDefinition.

As for other doIts, they're handled as if they were
meant to be InitializerDefinitions, unless there's
another reasonable guess to be made, viz.
  FlibbertyGibbet at: #meaningOfLife put: 42
would create a PoolVariableDefinition if a pool called
FlibbertyGibbet already existed.

I'm not totally thrilled with this, but it was the
simplest way I could see to build a mostly-robust
bridge.  It does impose upon the user the
responsibility to have a look at the resulting Package
and verify its contents, if s/he tries this trick.

Paul

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com




More information about the Squeak-dev mailing list