Replies: 1 comment
-
I felt the function approach more natural. One vote there. Now, if I write the data with output "dw", would I see anything? Is there any flag that can output this to validate the metadata is there? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Typed Metadata
Pre-read: #40 .
We have already talk about what metadata is, and all it uses. One problem that I still see is that though we now have a way to apply metadata without the need of doing
as
with a type, using the new<~
operator. We still don't have nice way to type checkit.For example in order of CData to be applied we have to set the metadata
{cdata: true}
, and here we have two problems one that users need to remember the name of the keys and its value type, and second that if you did some miss spelling like{cData: true}
it doesn't work, and you don't get any error or hint why not.Solutions
Use functions to apply metadata
One option would be let's create functions that allows us to apply metadata with typed values. For example this would be
Pros
Drawback Open Questions
Use annotations
Use annotation to attach metadata
With this approach we can let the engine that all the fields of the
Annotation
should be attached to the value as metadata values.We can take this approach and expand it to type expressions
The @metadata will be used to mark any annotation that represents a Metadata Annotation, and specifies the name of the metadata element to be set.
Also the annotation must have only one parameter called
value
that will represent the value of the metadata to be injected.Pros
Cons
Beta Was this translation helpful? Give feedback.
All reactions