Skip to content

New data type: tagged string#46

Merged
michaelklishin merged 1 commit intomainfrom
mk-tagged-string-type
Aug 3, 2024
Merged

New data type: tagged string#46
michaelklishin merged 1 commit intomainfrom
mk-tagged-string-type

Conversation

@michaelklishin
Copy link
Copy Markdown
Collaborator

In some cases the string data type is not
expressive enough. It requires key-specific
handling in the application, that is,
the key name becomes hardcoded if the string
has any special meaning to the app.

By introducing a new data type we enforce
a convention where a schema can define
a "special" kind (in fact, multiple kinds)
of string and it will be expressed in the
generated value, which will be a tagged tuple.

This approach avoids parser extensions,
whether this means native syntax or
a complex data type extension such as
the duration data type.

Closes #40.

In some cases the string data type is not
expressive enough. It requires key-specific
handling in the application, that is,
the key name becomes hardcoded if the string
has any special meaning to the app.

By introducing a new data type we enforce
a convention where a schema can define
a "special" kind (in fact, multiple kinds)
of string and it will be expressed in the
generated value, which will be a tagged tuple.

This approach avoids parser extensions,
whether this means native syntax or
a complex data type extension such as
the duration data type.

Closes #40.
@michaelklishin michaelklishin added this to the 3.3.0 milestone Aug 3, 2024
@michaelklishin michaelklishin merged commit 69bb0a2 into main Aug 3, 2024
@michaelklishin michaelklishin deleted the mk-tagged-string-type branch August 3, 2024 18:20
Copy link
Copy Markdown
Collaborator

@lukebakken lukebakken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Support for Secrets via Tagged or Term Values

2 participants