Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would it be possible to unreserve the @ character in YAML 1.3? #286

Open
anatoly-scherbakov opened this issue May 30, 2022 · 4 comments
Open

Comments

@anatoly-scherbakov
Copy link

YAML-LD initiative, looking forward to express JSON-LD vocabulary in YAML, forces to write something like this:

"@context": https://example.org/context.json
"@type": example:Page

The @-keywords have to be quoted because the @ character is reserved.

Is there any plan to perhaps unreserve that character? Or perhaps there are particular plans how to use it? Thank you!

@VladimirAlexiev
Copy link

json-ld/yaml-ld#51 is related

@perlpunk
Copy link
Member

perlpunk commented Jul 7, 2022

There are no plans to just unreserve that character.
It might get used in the future as a prefix for something like function calls. We only have two reserved chars, they are too precious to just unreserve them :)

@amiika
Copy link

amiika commented Oct 9, 2024

While it's understandable to reserve such characters for future needs, it's crucial to recognize the potential of @ as a versatile and potentially language-independent annotation mechanism for both metadata and functions. It's also just too valuable leave it untouched without a clear plan for its use.

@ingydotnet
Copy link
Member

ingydotnet commented Dec 22, 2024

The YAML core team is going to meet next month to discuss starting work on the next major YAML spec in 2025.
While I have a good idea what that will likely encompass, I'll hold off on specifics until after that meeting.

I can say that @perlpunk is right to say that just unreserving them is not something we plan to do.
They can be used for several things (possibly including annotations and functions) and I personally hope for multiple things (not just one specific purpose).

I'll also mention that the YAMLScript line of YAML loaders can already do anything programatically in YAML (quite elegantly) without needing anything beyond beyond YAML 1.2 syntax.

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

No branches or pull requests

5 participants