Jon Stewart on Fri, 3 Dec 2004 13:06:16 -0600 (CST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [nimh-dev] More stuff


> Oh, ok. Well, it might make sense to validate but not explode sequences. 
> Say I have a folder with 10k messages in it, and I do 'scan 1-10000'. I'm 
> not sure that we should create an array with 10k elements at parse-time. 
> Anything which needs the actual message numbers can just call 
> sequence.message_numbers(), and the expansion could be done then.


As far as implementation goes, a generator/iterator type of function would 
be a good idea. Each time you call it, the function evaluates lazily and 
returns the next message item. Kind of a high-level functional technique, 
so there's some overhead, but it is scalable. We could also use it, in the 
future, to define infinite sequences, filtering, etc.


Jon
-- 
Jon Stewart                                 Advanced Los Angeles C++
stew1@xxxxxxxxxxx                           http://www.alacpp.org
_______________________________________________
nimh-dev mailing list
nimh-dev@xxxxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/nimh-dev