Lazy Loading (was: Re: [squeak-dev] The Trunk: MorphicExtras-cmm.131.mcz)

Frank Shearar frank.shearar at gmail.com
Mon Dec 9 19:41:16 UTC 2013


On 08 Dec 2013, at 22:41, Chris Muller <asqueaker at gmail.com> wrote:

>> OK, I see what you mean. We do this kind of lazy loading in several
>> places. Every time I see it, I feel a strong ambivalence. On one hand,
>> it's really easy to write, and it's really convenient, but! (b) it's a
>> totally rubbish UX when you're offline. Click on something and
> 
> But, if you're offline, you won't be able to load that package
> manually anyway.  One way or another, that function is unavavailable,
> period.
> 
> So, what difference does it make _what_ error you get in that 1% case
> of being offline if, for the 99% case (on-line), no error is incurred
> at all?
> 
>> suddenly random failures happen because omigosh you're not connected
>> to the internet.
> 
> I know you still don't have it on the train but persistent internet
> connections are coming -- it's inevitable.  We should decide about the
> future in the context of the future.

That fails to help me now. It's also very not robust. _Depending_ on 'highly available' stuff makes you MORE vulnerable, not less. (because you end up trusting it, and 'trust' means 'something that can break my system')

>> I think lazy loading like this should be a last resort. Surely we can do better?
> 
> Why should it be a last resort instead of a first resort?  What do you
> propose for better?

Well, I don't have a monopoly on good ideas :). But how about this: if it's that important that you go to the trouble of hooking in a lazy load, why not just load the package in eagerly?

And if it's merely nice to have, why not use some kind of pluggable thing that allows me to choose the option. Random Internet connections are made of fail.

frank


More information about the Squeak-dev mailing list