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
Merge branch 'feature/Topic.BaseTopic' into develop
One of the key properties off of `Topic` is `DerivedTopic`, which points to another topic entity from which the current topic should inherit attribute values, if they're not defined locally. So if I request `topic.Attributes.GetValue("Title")`, it will first search `topic.Attributes`, but then search `topic.DerivedTopic.Attributes`, and so on.
The name of this property—and its underlying `AttributeDescriptor` and `ReferenceKey`—is confusing. It's not pointing to a _derived_ topic, but an _inherited_ topic. Unfortunately, the semantics of _inherited_, while more defensible, remain ambiguous, with many sources using the term e.g. "derived class" to refer to the derived class, while others use it to refer to the base class.
To mitigate this, I've adopted the term `BaseTopic`. This is similar to Microsoft's popular convention of exposing a property named `Base` to refer to _object_ inheritance. But by adding `Topic` to it, I hope to better distinguish between the local `base` keyword, which refers to _class_ inheritance. I'm not sure that the name alone does that, but it at least makes it more obvious when reading derived classes that `base` and `BaseTopic` are different identifiers, whereas `base` and `Base` could easily be confused.
This is an invasive change. In addition to the widespread references to `Topic.DerivedTopic`, the attribute descriptor named `DerivedTopic`, and the `TopicReferences` records with a `ReferenceKey` set to `DerivedTopic`, there are also parameters and variables related to the concept—such as `inheritFromDerived`—plus a lot of comments that allude to the relationship—while other cases of "derived" refer instead to class inheritance, and should be persisted. I've made a careful effort to distinguish and disambiguate these, and hopefully have caught all references.
0 commit comments