Posted by
pharo on
Jan 18, 2011; 10:50pm
URL: https://forum.world.st/Issue-3545-in-pharo-FEATURE-Multiple-Worlds-tp3222698p3224186.html
Comment #5 on issue 3545 by
[hidden email]: FEATURE: Multiple Worlds
http://code.google.com/p/pharo/issues/detail?id=3545Relationship to Project:
* all the flexibility of multiple worlds (except there is no UI for now,
maybe later we add a menu option, thumbnails, whatever
* none of the complexity / issues
Code statistics:
* Changes to PasteUpMorph
# methods added: 2
# lines per method: 5.5
# lines of longest method: 7
* 1 Class added: WorldManager
# methods: 10
# lines per method: 2.3
# lines of longest method: 7
# methods with no senders: 5 <-- maybe we should remove these, but I
wasn't sure what Jochen's intention was and wanted to hear from him before
I removed them. Maybe some/all are intended as an API?
- one single-line class method to access singleton
Open questions:
* should worlds be named, or numbered (like Mac Spaces), or both? Either
way, maybe that attribute (or both) should be encapsulated in
PasteUpMorph. But it's working, so we might as well play with it.
* should methods with no senders (WorldManager>>switchToWorldNamed:,
#createWorldNamed:, #switchToWorldNamed:, switchToWorldNamed:ifAbsent:,
#worlds) be removed.
Code used to collect statistics:
| methodSizes numMethods lpm |
methodSizes := WorldManager methodDictionary values collect: [ :m | m
linesOfCode - 1 ].
numMethods := WorldManager methodDictionary size. "10"
lpm := (methodSizes sum / numMethods) asFloat. "2.3"
methodSizes max. "7"
WorldManager methodDictionary values collect: [ :m | m linesOfCode - 1 ].
(WorldManager methodDictionary keys select: [ :s | (SystemNavigation
default allSendersOf: s) isEmpty ]) size. "5"