[squeak-dev] Re: Cosmetic: move or remove a few temps inside closures

Igor Stasenko siguctua at gmail.com
Mon Dec 28 02:07:35 UTC 2009


2009/12/28 Andreas Raab <andreas.raab at gmx.de>:
> Igor Stasenko wrote:
>>
>> Nicolas, i don't want to discourage you. Your dedication is beyond
>> praises, but as to me, we have a lot of
>> code, which requires deep revision & ground-up rewriting and from this
>> point, spending a precious time with just polishing seems like a waste
>> to me.
>
> I can only second that. I find polishing to be mostly useful within a
> subsystem when I have time to do final tweaks but most parts of the system
> are not in that shape and actually require more drastic changes.
>
>> However, if you like such kind of envolvement, i got an idea for you:
>> get rid of globals. :)
>
> Actually, it is more worthwhile to think about how the globals interact than
> merely replace them. If you look at what David and I have done with
>  Projects you get the idea - define an interface that provides a natural
> bottleneck for the context of the operation and vector it through this.
>

Of course i didn't meant doing things blindly. Sure thing, each global
requires personal attention.
If we replace use of global by gating all sends to another global
using new protocol,
then still its worthwhile, since at the end we'll have:
 a) 1 less global, used wildly
 b) new protocol defines a role and rules under which some object(s)
should play. This is a most important aspect of any well-engineered
software: clear distinction of roles.

>> Here's my list of most hated globals:
>> - Display
>> - Sensor
>> - World
>> - SourceFiles
>> - SystemChangeNotifier
>> - Utils
>
> Most of these could (and probably should) be vectored through Project
> current (i.e., Project current display/sensor/world/sources) and it would
> make some excellent sense because much of it is already project bound.
> That's the kind of refactoring that is both useful and (when complete) quite
> rewarding as it allows us to unload things that were previously unloadable.
>
well, as i said, each of them require personal attention.
But, if we manage to get rid of some of them, i wouldn't cry in despair :)

> Cheers,
>  - Andreas
>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list