oakes / odoyle-rules

A rules engine for Clojure(Script)
The Unlicense
530 stars 20 forks source link

Support for arbitrary id values #2

Closed den1k closed 3 years ago

den1k commented 3 years ago

Is there’s a reason ids have to be integers or qualified keywords?

https://github.com/oakes/odoyle-rules/blob/913a7414697e38cc8ba1847f68db8bb3c9633d38/src/odoyle/rules.cljc#L9

I’ve imagined using odoyle-rules with a remote db or frontend framework Where I often end up with either strings or idents, e.g [remote-db/id “42”] for ids

oakes commented 3 years ago

I wasn't able to come up with a good use case for arbitrary ids, but you make a good point. I'll change the spec to just be any? before the next release.

oakes commented 3 years ago

Just released 0.5.0 with this change :D