zrho / purescript-optic-ui

PureScript UI framework based on lenses.
122 stars 10 forks source link

Edit lenses #20

Open clayrat opened 8 years ago

clayrat commented 8 years ago

This is of course very theoretical - just wondering if you have seen this paper: http://dmwit.com/papers/201107EL.pdf

As I understood, they are passing around just the difference list (or generally, any monoid), so in theory a framework built upon such structure could probably get rid of the virtual dom and do the patching directly. There's even some kind of prototype implementation: https://hackage.haskell.org/package/edit-lenses https://hackage.haskell.org/package/edit-lenses-demo

zrho commented 8 years ago

This looks interesting! Indeed I haven't seen that one yet. Having that kind of stuff would some hard problems; the Haskell implementation in edit-lenses however seems rather unwieldy. I'll think about it for a while... Maybe there even is a way to make it compatible with profunctor lenses, so that an optic switches between an ordinary optic and an edit variant. Stuff for thought. Thank you for the reference!