{"action":"opened","issue":{"url":"https://api.github.com/repos/hylang/hy/issues/911","labels_url":"https://api.github.com/repos/hylang/hy/issues/911/labels{/name}","comments_url":"https://api.github.com/repos/hylang/hy/issues/911/comments","events_url":"https://api.github.com/repos/hylang/hy/issues/911/events","html_url":"https://github.com/hylang/hy/issues/911","id":101716659,"number":911,"title":"def vs setv","user":{"login":"gilch","id":3346292,"avatar_url":"https://avatars.githubusercontent.com/u/3346292?v=3","gravatar_id":"","url":"https://api.github.com/users/gilch","html_url":"https://github.com/gilch","followers_url":"https://api.github.com/users/gilch/followers","following_url":"https://api.github.com/users/gilch/following{/other_user}","gists_url":"https://api.github.com/users/gilch/gists{/gist_id}","starred_url":"https://api.github.com/users/gilch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gilch/subscriptions","organizations_url":"https://api.github.com/users/gilch/orgs","repos_url":"https://api.github.com/users/gilch/repos","events_url":"https://api.github.com/users/gilch/events{/privacy}","received_events_url":"https://api.github.com/users/gilch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-18T18:11:43Z","updated_at":"2015-08-18T18:11:43Z","closed_at":null,"body":"A subissue from #240.\r\n\r\nThese do *exactly* the same thing as far as I can tell. We don't need both. `def` is a Python keyword, so it gets priority in my mind. However, it's currently defined to do something very different than the Python `def`, so I'm less certain.\r\n\r\nAs pointed out in the discussion for #899, we don't actually *have* to reserve Python keywords in Hy. It might be problematic for Hy/Python interop not to, but there are workarounds. So the opposite is also possible. We can just keep `setv` and treat `def` like any other symbol.\r\n\r\nI've heard arguments that we should keep both, the gist being because `def` feels more like a global constant definition, and `setv` feels more like a variable change. I don't exactly buy this because,\r\n + they're doing *exactly* the same thing;\r\n + we can have nested `defn`, `defclass`, and `defmacro` meaning the def- prefix does not really mean global nor constant elsewhere in Hy;\r\n + global \"constants\" already have earmuffs/caps to distinguish them from normal variables and we don't need another convention on top of that. \r\n\r\nBut if this feeling is still that important, there are some alternative ways to deal with it."}}