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
The use of Store.wrap to wrap stores led to some design difficulties when wrapping objects that have methods, other than those of MutuableMapping that use (as inputs or outputs) keys or values.
This happened in the context of our work on Mapping Views and mongodol.
The problem here is that this method obliges us to add this wrapper argument in all our store wrappers -- or at least those who use Store.wrap.
One way to mitigate this would be to make the store_decorator add that argument (and it's handling).
Another way would be to not include this wrapper argument in the wrapping functions at all, but instead, have them look for
a hook in the object they're wrapping. Which would result in the above code being replaced by:
The use of
Store.wrap
to wrap stores led to some design difficulties when wrapping objects that have methods, other than those ofMutuableMapping
that use (as inputs or outputs) keys or values.This happened in the context of our work on Mapping Views and
mongodol
.@valentin-feron; you can add more detail if you want.
In order to repair this, a
wrapper
argument was added tokv_wraps
, used like this:The problem here is that this method obliges us to add this
wrapper
argument in all our store wrappers -- or at least those who useStore.wrap
.One way to mitigate this would be to make the
store_decorator
add that argument (and it's handling).Another way would be to not include this
wrapper
argument in the wrapping functions at all, but instead, have them look fora hook in the object they're wrapping. Which would result in the above code being replaced by:
┆Issue is synchronized with this Asana task by Unito
The text was updated successfully, but these errors were encountered: