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

+decorate meta to enable auto-decoration of all objects #3731

Open
yegor256 opened this issue Dec 23, 2024 · 3 comments
Open

+decorate meta to enable auto-decoration of all objects #3731

yegor256 opened this issue Dec 23, 2024 · 3 comments

Comments

@yegor256
Copy link
Member

yegor256 commented Dec 23, 2024

Now, I do this:

[] > foo
  join.
    QQ.txt.text ","
    split.
      QQ.txt.text
        "hello jeff"

Looks rather verbose, since I have to decorate string with QQ.txt.text every time I use it. How about this sugar instead:

+decorate QQ.string ~> QQ.txt.text

[] > foo
  join.
    ","
    split.
      "hello jeff"

Or simply this:

+decorate string ~> QQ.txt.text

This meta means: "every object of the string forma must be automatically decorated with QQ.txt.text"

@yegor256
Copy link
Member Author

@maxonfjvipon WDYT?

@maxonfjvipon
Copy link
Member

@yegor256 I like the idea. The only controversial thing is ~> sign. I believe it should be simpler, because tilda is not the most convenient key to press on keyboard

@yegor256
Copy link
Member Author

@maxonfjvipon we can do > instead, but this symbol is already used for object naming. May lead to confusion. How about @> instead?

+decorate string @> QQ.txt.text @> foo

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

2 participants