Repository navigation
New data types: "plain" binary, tagged binary - #52
Merged
Merged
Conversation
Similar to string and tagged string, respectively.
michaelklishin
added a commit
that referenced
this pull request
Oct 20, 2026
In #46 [1] we introduced a way to tag a value with a prefix, and in #52 [2], a few more types that use that machinery. That works well for a lot of cases. However, tagged values also have a limitation: a colon is used to separate the tag from the value. Some values, namely URLs and URIs, are guaranteed to have a colon. Therefore we need a new data type that would fix the prefix and make it trivial for the parser to not mistake `http` or `amqp` or `urn` schemes for a tag. I have considered several alternatives on top of prefixed strings and they all ended up being much more complex than this convention-based specialization of the generic tagged value idea. Some examples from the `REFERENCE.md` file: ```erlang {datatype, [encrypted_binary, binary]} {datatype, [encrypted_string, {uri, [https]}]} ``` ```ini default_pass = encrypted:ec3Z4yFBjnzh+7VeDZ+tRoB7LFI2ZnU8H8eyIingNwV8d1q/DQ/cF4rnZXzwgszlLd0ZkEz5WaMZoNa8n50dqA== trust_store.url = https://ca.example.com/certs ``` 1. #46 2. #52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Similar to string and tagged string (#46), respectively.