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

Predicate validation in JBIND #10

Open
aartaka opened this issue Oct 6, 2023 · 0 comments
Open

Predicate validation in JBIND #10

aartaka opened this issue Oct 6, 2023 · 0 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@aartaka
Copy link
Contributor

aartaka commented Oct 6, 2023

jbind is quite useful already, but it is somewhat hard-coded in functionality. Allowing arbitrary predicates is probably the biggest customization that can happen to it, so that one can do:

(njson:jbind #(1 #'evenp 3 (lambda (n) (= n 4)) five)
    five)

And make sure that an array like #(1 8 3 4 X ...) passes the check and returns the provided X.

Problematic moment is: function and lambda forms conflict with optional value parsing due to being symbol conses.

So it's either hard-coding the rules for function, lambda, quote etc. (which is really unreliable), or coming up with a new syntax. Risking too much bloat here...

@aartaka aartaka added enhancement New feature or request question Further information is requested labels Oct 6, 2023
@aartaka aartaka changed the title Predicate validation in jbind Predicate validation in JBIND Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Development

No branches or pull requests

1 participant