Hello Adam, 2010/1/22, Adam Chlipala <[email protected]>: > Artyom Shalkhakov wrote: >> After looking at the example dlist module, I noticed that it was much >> more elaborate. What is the reason for that? > > The biggest reason is performance. With the naive list-based technique, > consider what happens when you want to change one element of the list: > you must regenerate the whole page section for the list. With Dlist, > only the section for the particular element is recomputed. > > There are also a few observable side effects of recomputation. For > instance, the cursor position in a textbox will be reset, even if that > textbox isn't part of the rendering of the list element you've changed. > If you want to avoid these consequences, you might prefer Dlist or a > similar approach.
Thanks for noting this. >> Also, I found that code >> hard to follow; is there a nice metaphor or something to help making >> sense out of that code? >> > > Did you try to understand the signature first? It's meant to be easy to > understand as an alternate presentation of lists with extra reactive > functionality. I was talking about the implementation, sorry for being confusing. Please disregard this question. Cheers, Artyom Shalkhakov _______________________________________________ Ur mailing list [email protected] http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
