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

data types supported in literals #6

Open
Gozala opened this issue Feb 26, 2024 · 1 comment
Open

data types supported in literals #6

Gozala opened this issue Feb 26, 2024 · 1 comment

Comments

@Gozala
Copy link

Gozala commented Feb 26, 2024

Literal(Json)

Can we restrict literals to just scalars ? I think it will get hairy otherwise especially if we start extending policy syntax in the future.

@expede
Copy link
Member

expede commented Feb 26, 2024

Just to make sure that I understand the scope of the question, you're suggesting that one shouldn't be able to unify against collections?

// Disallowed
["==", ".foo", [1, 2, 3]]

If that were disallowed, would I have to expand this to the following to do the same:

[
  ["==", ".foo.[0]", 1],
  ["==", ".foo.[1]", 2],
  ["==", ".foo.[2]", 3]
]

I personally think the pattern match is easier to read 🤔

I think it will get hairy otherwise especially if we start extending policy syntax in the future.

Interesting — how so?

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