{"action":"created","issue":{"url":"https://api.github.com/repos/clojurewerkz/ogre/issues/57","labels_url":"https://api.github.com/repos/clojurewerkz/ogre/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/clojurewerkz/ogre/issues/57/comments","events_url":"https://api.github.com/repos/clojurewerkz/ogre/issues/57/events","html_url":"https://github.com/clojurewerkz/ogre/issues/57","id":54064048,"number":57,"title":"Have has accept only a predicate instead of predicate and value","user":{"login":"sbelak","id":178038,"avatar_url":"https://avatars.githubusercontent.com/u/178038?v=3","gravatar_id":"","url":"https://api.github.com/users/sbelak","html_url":"https://github.com/sbelak","followers_url":"https://api.github.com/users/sbelak/followers","following_url":"https://api.github.com/users/sbelak/following{/other_user}","gists_url":"https://api.github.com/users/sbelak/gists{/gist_id}","starred_url":"https://api.github.com/users/sbelak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbelak/subscriptions","organizations_url":"https://api.github.com/users/sbelak/orgs","repos_url":"https://api.github.com/users/sbelak/repos","events_url":"https://api.github.com/users/sbelak/events{/privacy}","received_events_url":"https://api.github.com/users/sbelak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-12T15:11:17Z","updated_at":"2015-01-12T15:48:51Z","closed_at":null,"body":"This would solve two issues:\r\n\r\n1) right now it's impossible to use a unary predicate in has (for instance to check for some invariant)\r\n\r\n2) it would remove the ambiguity of argument order. The current situation is less than ideal as the property is inserted as the second argument which breaks with clj expectations (note how > changes to < between has and every?):\r\n```\r\n(let [g (u/classic-tinkergraph)\r\n       vs (q/query (v/get-all-vertices g)\r\n                      (q/has :age > (int 30))\r\n                      q/into-vec!)]\r\n   (every? (partial < 30) (u/get-ages vs))))\r\n```\r\nOn the other hand, if we automatically change the order around it might mess with the heads of people coming from Gremlin in other languages. Therefor I think it best to have the user be explicit about where to stick the property by closing over the constants themselves."},"comment":{"url":"https://api.github.com/repos/clojurewerkz/ogre/issues/comments/69590145","html_url":"https://github.com/clojurewerkz/ogre/issues/57#issuecomment-69590145","issue_url":"https://api.github.com/repos/clojurewerkz/ogre/issues/57","id":69590145,"user":{"login":"sbelak","id":178038,"avatar_url":"https://avatars.githubusercontent.com/u/178038?v=3","gravatar_id":"","url":"https://api.github.com/users/sbelak","html_url":"https://github.com/sbelak","followers_url":"https://api.github.com/users/sbelak/followers","following_url":"https://api.github.com/users/sbelak/following{/other_user}","gists_url":"https://api.github.com/users/sbelak/gists{/gist_id}","starred_url":"https://api.github.com/users/sbelak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbelak/subscriptions","organizations_url":"https://api.github.com/users/sbelak/orgs","repos_url":"https://api.github.com/users/sbelak/repos","events_url":"https://api.github.com/users/sbelak/events{/privacy}","received_events_url":"https://api.github.com/users/sbelak/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T15:48:51Z","updated_at":"2015-01-12T15:48:51Z","body":"You are right, at the minimum I amend my proposition to retain the predicate and value airity. Still think has should be overloaded for unary predicates (that doesn't mess up anything as it just adds functionality that previously wasn't there).\r\n\r\nWill also add special cases back in."}}