You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find data.tree cumbersome because of mutation. I want a library free of this inconvenience, but it does a lot of nice things I would miss. Convenient print methods, easy data.frame conversion, automatic ancestry/depth tracking. I am torn between writing lenses for data.tree and writing a simpler tree library built around a lens API. Provided I write simple conversions between the two we could potentially have the best of both worlds.
Writing lenses for data.tree would involve checking to see if the lens is pointing at a node, following the node's ancestry to the tree root, and triggering a full copy on set. It is possible I'm over-estimating the performance problems associated with this. R triggers full list copies on modify too, although I suspect R is making very smart choices about copying/GC that make it dramatically faster than copying data.trees (although I should really test).
Hacking a tree API seems easier to me than optimizing copy speed or decreasing copy frequency in data.tree but involves writing a lot more code.
Decisions, decisions.
The text was updated successfully, but these errors were encountered:
I find
data.tree
cumbersome because of mutation. I want a library free of this inconvenience, but it does a lot of nice things I would miss. Convenient print methods, easydata.frame
conversion, automatic ancestry/depth tracking. I am torn between writing lenses fordata.tree
and writing a simpler tree library built around a lens API. Provided I write simple conversions between the two we could potentially have the best of both worlds.Writing lenses for
data.tree
would involve checking to see if the lens is pointing at a node, following the node's ancestry to the tree root, and triggering a full copy onset
. It is possible I'm over-estimating the performance problems associated with this. R triggers full list copies on modify too, although I suspect R is making very smart choices about copying/GC that make it dramatically faster than copyingdata.tree
s (although I should really test).Hacking a tree API seems easier to me than optimizing copy speed or decreasing copy frequency in
data.tree
but involves writing a lot more code.Decisions, decisions.
The text was updated successfully, but these errors were encountered: