[ ] As a nice bonus, #400 "automatically" facilitates "dynamic data inheritance": local config instances in derived classes could chain back to the config of the base, and then queries on derived.cfg would implicitly get stuff from base.cfg (just like accessing inherited members in C++).
[ ] And a similar, but forward chaining logic -- passing a query to a linked instance first, and only performing a local query if that didn't yield a result -- would implement "data polymorphism"!... (A features that's sorely (but understandably) missing from C++...)
[ ] And then notice how this all has very little to do with "configurations" specifically: this is just a generic property store model! Even the lame explicitly typed getters/setters (-- setters are unused yet, tho; maybe that's what makes it a config! :) ) are there, the obligatory facilities of runtime-typed obj. stores... :)
[ ] What to do with writing, if there's a chained instance? OK, just write to the "closest" (local) scope, but there should probably be some way to "qualify" the scope if that's not what's intended (just like how e.g. C++` does it).
(Follow-up of #400)
[ ] As a nice bonus, #400 "automatically" facilitates "dynamic data inheritance": local config instances in derived classes could chain back to the config of the base, and then queries on
derived.cfg
would implicitly get stuff frombase.cfg
(just like accessing inherited members in C++).[ ] And a similar, but forward chaining logic -- passing a query to a linked instance first, and only performing a local query if that didn't yield a result -- would implement "data polymorphism"!... (A features that's sorely (but understandably) missing from C++...)
[ ] And then notice how this all has very little to do with "configurations" specifically: this is just a generic property store model! Even the lame explicitly typed getters/setters (-- setters are unused yet, tho; maybe that's what makes it a config! :) ) are there, the obligatory facilities of runtime-typed obj. stores... :)
[ ] What to do with writing, if there's a chained instance? OK, just write to the "closest" (local) scope, but there should probably be some way to "qualify" the scope if that's not what's intended (just like how e.g. C++` does it).