-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Metadata types should be immutable since they describe something that has been read and cannot be changed. There are some challenges to this such as:
- Nested types may want a reference to their parent, but if the nested type constructs first it can't reference the parent, and if the parent constructs first, it can't contain the children
- Methods/properties/fields can all have the type they belong to as types or parameter signatures, or worse, nested types
Some solutions here are:
- Use a prototype pattern to build the structure, with prototypes caching their own instantiation. Then crystallise the whole metadata hierarchy in a second pass
- Use lazy instantiation. This has the benefit of possibly being more performant for workloads that are only interested in a subset of metadata, but would have overhead in general
Metadata
Metadata
Assignees
Labels
No labels