D2 std.container ? container update events..

Igor Lesik curoles at yahoo.com
Wed Mar 24 22:31:04 PDT 2010


"BLS" <windevguy at hotmail.de> wrote in message 
news:hobh22$13t4$1 at digitalmars.com...
> Now How is it..
> We had a long and interesting discussion about ranges vs java/C whatever 
> style(d) iterators.  ... to bring in an idea.. what about
> implementing update events for collections. IMHO this is a very reasonable 
> feature.
>
> (I am not talking about non-modifying events likewise cursor/snapshot 
> creation-events or cursor moving-events.. Interesting though )
>
> sample: database update events will force to pull data when needed and not 
> just in case.
> Indeed this is a high end feature, so what about
> create auto structures ..say.. backup structures on events..
>
> Our container(T) implementation can be based on a linked list implementing 
> a forward range and will feed our UnDo container(T) (based i.e. on remove 
> events)
>
> It would be very interesting to see how all these necessary D2 components 
> : ranges, std.algo, collection/container, aliases and delegates will come 
> together.
>
> ...I think our node like stuff (the core data structure) should be 
> implemented as structure, our container as class-interface pair where the 
> interface describes at least the range. I agree with Steven and Andrei, 
> hierarchic containers are over-estimated.
>
> Bjoern
> PS
> D celebrates meanwhile it s 10? birthday and phobos still lacks an 
> collection lib. Ouch
>

I am not sure I understand what is the source and destination of the events
and what triggers them. But I was thinking that events could be used to 
invalidate
ranges if the container changed, i.e. use events to implement "weak"
coupling between container and range. I hope it does not sound too silly.

Igor 





More information about the Digitalmars-d mailing list