{"action":"created","issue":{"url":"https://api.github.com/repos/hylang/hy/issues/1142","repository_url":"https://api.github.com/repos/hylang/hy","labels_url":"https://api.github.com/repos/hylang/hy/issues/1142/labels{/name}","comments_url":"https://api.github.com/repos/hylang/hy/issues/1142/comments","events_url":"https://api.github.com/repos/hylang/hy/issues/1142/events","html_url":"https://github.com/hylang/hy/pull/1142","id":185781192,"number":1142,"title":"Give `require` the same features as `import`","user":{"login":"Kodiologist","id":322730,"avatar_url":"https://avatars.githubusercontent.com/u/322730?v=3","gravatar_id":"","url":"https://api.github.com/users/Kodiologist","html_url":"https://github.com/Kodiologist","followers_url":"https://api.github.com/users/Kodiologist/followers","following_url":"https://api.github.com/users/Kodiologist/following{/other_user}","gists_url":"https://api.github.com/users/Kodiologist/gists{/gist_id}","starred_url":"https://api.github.com/users/Kodiologist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kodiologist/subscriptions","organizations_url":"https://api.github.com/users/Kodiologist/orgs","repos_url":"https://api.github.com/users/Kodiologist/repos","events_url":"https://api.github.com/users/Kodiologist/events{/privacy}","received_events_url":"https://api.github.com/users/Kodiologist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-27T21:10:22Z","updated_at":"2016-10-29T05:55:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hylang/hy/pulls/1142","html_url":"https://github.com/hylang/hy/pull/1142","diff_url":"https://github.com/hylang/hy/pull/1142.diff","patch_url":"https://github.com/hylang/hy/pull/1142.patch"},"body":"You can now do `(require foo)`, `(require [foo [a b c]])`, `(require [foo [*]])`, and `(require [foo :as bar])`. The first and last forms get you macros named `foo.a`, `foo.b`, etc. or `bar.a`, `bar.b`, etc., respectively. The second form only gets the macros in the list.\r\n\r\nImplements #1118 and perhaps partly addresses #277.\r\n\r\nN.B. The new meaning of `(require foo)` will cause all existing code that uses macros to break. Simply replace these forms with `(require [foo [*]])` to get your code working again.\r\n\r\nThere's a bit of a hack involved in the forms `(require foo)` and `(require [foo :as bar])`. When you call `(foo.a ...)` or `(bar.a ...)`, Hy doesn't actually look inside modules. Instead, these `(require ...)` forms give the macros names that have periods in them, which happens to work fine with the way Hy finds and interprets macro calls.\r\n\r\nIf this all looks good, I'll update the documentation accordingly."},"comment":{"url":"https://api.github.com/repos/hylang/hy/issues/comments/257073271","html_url":"https://github.com/hylang/hy/pull/1142#issuecomment-257073271","issue_url":"https://api.github.com/repos/hylang/hy/issues/1142","id":257073271,"user":{"login":"tuturto","id":1389385,"avatar_url":"https://avatars.githubusercontent.com/u/1389385?v=3","gravatar_id":"","url":"https://api.github.com/users/tuturto","html_url":"https://github.com/tuturto","followers_url":"https://api.github.com/users/tuturto/followers","following_url":"https://api.github.com/users/tuturto/following{/other_user}","gists_url":"https://api.github.com/users/tuturto/gists{/gist_id}","starred_url":"https://api.github.com/users/tuturto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuturto/subscriptions","organizations_url":"https://api.github.com/users/tuturto/orgs","repos_url":"https://api.github.com/users/tuturto/repos","events_url":"https://api.github.com/users/tuturto/events{/privacy}","received_events_url":"https://api.github.com/users/tuturto/received_events","type":"User","site_admin":false},"created_at":"2016-10-29T05:55:44Z","updated_at":"2016-10-29T05:55:44Z","body":"This is good change in my opinion. It will be a bit of a pain to fix all of existing code, but it'll be worth it."}}
{"actor":{"display_login":"tuturto"}}