{"action":"created","issue":{"url":"https://api.github.com/repos/hylang/hy/issues/880","labels_url":"https://api.github.com/repos/hylang/hy/issues/880/labels{/name}","comments_url":"https://api.github.com/repos/hylang/hy/issues/880/comments","events_url":"https://api.github.com/repos/hylang/hy/issues/880/events","html_url":"https://github.com/hylang/hy/pull/880","id":99873900,"number":880,"title":"Remove some redundant keywords","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":{"url":"https://api.github.com/repos/hylang/hy/milestones/8","html_url":"https://github.com/hylang/hy/milestones/Grand%20Language%20Cleanup","labels_url":"https://api.github.com/repos/hylang/hy/milestones/8/labels","id":1224085,"number":8,"title":"Grand Language Cleanup","description":"There are a couple of workarounds in the language that have bugs and issues that are hard (or even impossible) to solve, because of being tied to Python semantics. Instead of trying to be something the language isn't, these should be cleaned up, and replaced with something more pythonic - and thus less buggy from a pythonist PoV. To ease migration, a compatibility shim may be provided.\r\n\r\nLets track these here!","creator":{"login":"algernon","id":17243,"avatar_url":"https://avatars.githubusercontent.com/u/17243?v=3","gravatar_id":"","url":"https://api.github.com/users/algernon","html_url":"https://github.com/algernon","followers_url":"https://api.github.com/users/algernon/followers","following_url":"https://api.github.com/users/algernon/following{/other_user}","gists_url":"https://api.github.com/users/algernon/gists{/gist_id}","starred_url":"https://api.github.com/users/algernon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algernon/subscriptions","organizations_url":"https://api.github.com/users/algernon/orgs","repos_url":"https://api.github.com/users/algernon/repos","events_url":"https://api.github.com/users/algernon/events{/privacy}","received_events_url":"https://api.github.com/users/algernon/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":6,"state":"open","created_at":"2015-07-24T13:55:39Z","updated_at":"2015-08-09T18:02:14Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-08-09T07:59:19Z","updated_at":"2015-08-09T18:54:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hylang/hy/pulls/880","html_url":"https://github.com/hylang/hy/pull/880","diff_url":"https://github.com/hylang/hy/pull/880.diff","patch_url":"https://github.com/hylang/hy/pull/880.patch"},"body":"Ref #240 in the Grand Language Cleanup. This is not enough to close the issue, but it helps. The redundant keywords I am aware of in Hy are:\r\n```\r\nraise/throw\r\nexcept/catch\r\ndo/progn\r\ndefn/defun\r\nlif/lisp-if and lif-not/lisp-if-not\r\ndefn-alias/defun-alias\r\n\r\nTrue/true\r\nFalse/false\r\nNone/nil/null\r\n\r\ndef/setv\r\nlambda/fn\r\nfirst/car\r\nrest/cdr\r\n```\r\nThis pull request only touches the first group, likely to be the least controversial. The second group may be a bit more difficult to fix. The third group has slightly different behavior/convention, so may be harder to unify.\r\n\r\nRemoved: `throw`\r\nRationale: `raise` is a Python keyword, and thus reserved anyway. This reduces the number of reserved words in Hy, while the other choice would not. It is also less confusing to Python programmers.\r\n\r\nRemoved: `catch`\r\nRationale: `except` is a Python keyword, same as above.  `catch` was popular, perhaps because it's shorter, but when choosing between Python reserved words and equivalent Clojure words, Hy must choose Python's words, or redundancy in reserved words remains.\r\n\r\nRemoved: `progn`\r\nRationale: `do` is shorter, and `progn` was barely ever used in Hy anyway; Clojure forms are more favored by the community than Common Lisp's.\r\n\r\nRemoved: `defun`\r\nRationale: as above, `defn` is shorter, used more, and Clojure, rather than CL. (This commit also removes `defun-alias`.)\r\n\r\nRemoved: `lisp-if` and `lisp-if-not`\r\nRationale: `lif` and `lif-not` are shorter. A weak reason, but had to break the tie somehow. These aren't used that much anyway.\r\n\r\nRemoved: `defn-alias` and `defmacro-alias`\r\nRationale: After removing the above redundancies, these are no longer required in Hy itself. They are also likely to cause similar redundancy issues in the future, in Hy and elsewhere, thus were bad for the health of the Hy ecosystem."},"comment":{"url":"https://api.github.com/repos/hylang/hy/issues/comments/129225565","html_url":"https://github.com/hylang/hy/pull/880#issuecomment-129225565","issue_url":"https://api.github.com/repos/hylang/hy/issues/880","id":129225565,"user":{"login":"algernon","id":17243,"avatar_url":"https://avatars.githubusercontent.com/u/17243?v=3","gravatar_id":"","url":"https://api.github.com/users/algernon","html_url":"https://github.com/algernon","followers_url":"https://api.github.com/users/algernon/followers","following_url":"https://api.github.com/users/algernon/following{/other_user}","gists_url":"https://api.github.com/users/algernon/gists{/gist_id}","starred_url":"https://api.github.com/users/algernon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algernon/subscriptions","organizations_url":"https://api.github.com/users/algernon/orgs","repos_url":"https://api.github.com/users/algernon/repos","events_url":"https://api.github.com/users/algernon/events{/privacy}","received_events_url":"https://api.github.com/users/algernon/received_events","type":"User","site_admin":false},"created_at":"2015-08-09T18:54:40Z","updated_at":"2015-08-09T18:54:40Z","body":":+1: on keeping the `setv`/`def` pair. I'd also keep the `true`, `false`, `null` and `nil` aliases (because I use them a lot, and shift is far away). `lambda` and `fn` are slightly different in behaviour, if I remember correctly, but that may have changed.\r\n\r\nI also seem to remember there being a slight difference between `first`/`car` and `rest`/`cdr`, but I may be imagining things."}}