[squeak-dev] Re: Letting Set contain nils?

tim Rowledge tim at rowledge.org
Sat Aug 9 22:36:42 UTC 2008


On 9-Aug-08, at 12:15 PM, Eliot Miranda wrote:

>
>
> On Sat, Aug 9, 2008 at 10:25 AM, tim Rowledge <tim at rowledge.org>  
> wrote:
> When Sets are created the array holding the values is of course  
> filled with nils by the VM. Using any other object to signify 'this  
> slot is empty' would of course cost time to iterate over the array  
> and fill each slot. Then for every grow it would cost more time to  
> fill the new slots with this other distinguished value.
>
> No it _would not_.  With a primitive that took the argument to fill  
> with it would take no extra time.  e.g.

Oh sure, add a prim to support a tacky idea.

At least extend it to improve interrupt response time, like we did at  
Interval. First step is to create a suitably sized WordArray without  
bothering to set the contents to anything, which is ok since it won't  
be scanned for GC. Then fill with suitable value words. Then convert  
to originally wanted class of array. Then return the finished object.  
Each step is either very quick or easily and safely interrupted/ 
resumed so as to allow interrupt response times helpful to media  
systems even in the face of very large arrays.

>
> Indeed.  But before the standards committee comes down on us hard  
> can we not discuss the concept first?  Or are you still venting over  
> _ being replaced with :=, or with:......with: being replaced with,  
> gasp, horror, *curly braces* argh!!!!  Ohhhh noooo, mister bill......
Oh for fuck's sake. I've really had enough of this. Bye.




More information about the Squeak-dev mailing list