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
first, each plugin is inserted as shng.<plg_section>,
second, each top-level item is inserted as shng.<item_top_path>
This has lead to collisions, at least for me. So, as there is no check if plugin identifier or item path are already present, the previous is overwritten by the latter.
Proposal:
to not change anything, leave the system in place (at least for now)
create a namespace (empty object? plugins/items class?) below shng
create plugin/item references in these namespaces
So, instead of (in addition to...) sh.<plugin1>, sh.<plugin2>, sh.<item1>, sh.<item2>, we would be able to use sh.plugins.<plugin1>, sh.plugins.<plugin2>, sh.items.<item1>, sh.items.<item2>
Caveat: if using lib.plugins and lib.items as namespace, make quite sure that plugin/item names don't overwrite plugins/items members (easy to implement...)
Pros:
structured access
collision free (in regard between items and plugins)
nonbreaking
cleanup for later; dynamic plugin unload might remove ref to item/item tree (!))
Cons:
collisions still possible with namespace methods
larger memory footprint, though probably neglectible, (# of plugins + # of top level items) * ref size
Any comments or ideas?
Implementation is fairly simple and already mentally prepared ;)
The text was updated successfully, but these errors were encountered:
At the moment, during initialization of shng,
first, each plugin is inserted as shng.<plg_section>,
second, each top-level item is inserted as shng.<item_top_path>
This has lead to collisions, at least for me. So, as there is no check if plugin identifier or item path are already present, the previous is overwritten by the latter.
Proposal:
So, instead of (in addition to...)
sh.<plugin1>
,sh.<plugin2>
,sh.<item1>
,sh.<item2>
, we would be able to usesh.plugins.<plugin1>
,sh.plugins.<plugin2>
,sh.items.<item1>
,sh.items.<item2>
Caveat: if using lib.plugins and lib.items as namespace, make quite sure that plugin/item names don't overwrite plugins/items members (easy to implement...)
Pros:
Cons:
Any comments or ideas?
Implementation is fairly simple and already mentally prepared ;)
The text was updated successfully, but these errors were encountered: