Great stuff @etardiff!
I know this wasn’t aimed at me, but my take is that the goal is mostly to override certain features of any tiddler without actually changing that tiddler. So while core tiddlers would probably be a major use-case, it would also help with MWS’s bags-and-recipes design and with anyplace you have tiddlers you want to override but don’t want to touch.
I really do think this would cover pretty well all the use-cases we’ve discussed here. Moreover it would serve as a substantial first step toward solving the issue I discuss in Tiddlers with JS-prototype tiddlers.
I would prefer $:/override/
.
Major caveats
I’m learning little bits of the core, finally, but still don’t have nearly the experience to answer this. But my suspicions are that this would be huge. Every get for any field would need to check not only the tiddler object itself, but also its overriding peer. I don’t know how well those could be cached in the object itself. If they can’t it would be much worse, but even if they can, it would turn code like
tiddler.fields[fieldName]
into something logically like this:
tiddler?.__peer__.fields[fieldName] ?? tiddler.fields[fieldName]
I don’t know whether the code for this is already centralized so that we can fix this in a single place, so I don’t know how much work it would take to implement. But it’s possible that it would be a fairly simple change.
My other concern would be about how to remove an override. If for instance, we overrode the text
field, and later realized that we no longer wanted to do that, we can easily set it to an empty string, but we can’t easily remove the field. However, for, say, the tags
field, we would want the empty string to override the existing non-empty one. I imagine would could find a UI that helps with this, but I think it’s at least a potentially serious problem.
So I like the idea, but I’m still somewhat wary of it.