{"action":"created","issue":{"url":"https://api.github.com/repos/ruby-rdf/rdf/issues/192","labels_url":"https://api.github.com/repos/ruby-rdf/rdf/issues/192/labels{/name}","comments_url":"https://api.github.com/repos/ruby-rdf/rdf/issues/192/comments","events_url":"https://api.github.com/repos/ruby-rdf/rdf/issues/192/events","html_url":"https://github.com/ruby-rdf/rdf/issues/192","id":76054993,"number":192,"title":"Revisit methods that return arrays versus enumerators","user":{"login":"gkellogg","id":46296,"avatar_url":"https://avatars.githubusercontent.com/u/46296?v=3","gravatar_id":"","url":"https://api.github.com/users/gkellogg","html_url":"https://github.com/gkellogg","followers_url":"https://api.github.com/users/gkellogg/followers","following_url":"https://api.github.com/users/gkellogg/following{/other_user}","gists_url":"https://api.github.com/users/gkellogg/gists{/gist_id}","starred_url":"https://api.github.com/users/gkellogg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkellogg/subscriptions","organizations_url":"https://api.github.com/users/gkellogg/orgs","repos_url":"https://api.github.com/users/gkellogg/repos","events_url":"https://api.github.com/users/gkellogg/events{/privacy}","received_events_url":"https://api.github.com/users/gkellogg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ruby-rdf/rdf/labels/feature","name":"feature","color":"96fab9"}],"state":"open","locked":false,"assignee":{"login":"bendiken","id":4963,"avatar_url":"https://avatars.githubusercontent.com/u/4963?v=3","gravatar_id":"","url":"https://api.github.com/users/bendiken","html_url":"https://github.com/bendiken","followers_url":"https://api.github.com/users/bendiken/followers","following_url":"https://api.github.com/users/bendiken/following{/other_user}","gists_url":"https://api.github.com/users/bendiken/gists{/gist_id}","starred_url":"https://api.github.com/users/bendiken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendiken/subscriptions","organizations_url":"https://api.github.com/users/bendiken/orgs","repos_url":"https://api.github.com/users/bendiken/repos","events_url":"https://api.github.com/users/bendiken/events{/privacy}","received_events_url":"https://api.github.com/users/bendiken/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/ruby-rdf/rdf/milestones/2","html_url":"https://github.com/ruby-rdf/rdf/milestones/2.0","labels_url":"https://api.github.com/repos/ruby-rdf/rdf/milestones/2/labels","id":1108897,"number":2,"title":"2.0","description":"Features, deprecations and other changes targeted for RDF.rb 2.0","creator":{"login":"gkellogg","id":46296,"avatar_url":"https://avatars.githubusercontent.com/u/46296?v=3","gravatar_id":"","url":"https://api.github.com/users/gkellogg","html_url":"https://github.com/gkellogg","followers_url":"https://api.github.com/users/gkellogg/followers","following_url":"https://api.github.com/users/gkellogg/following{/other_user}","gists_url":"https://api.github.com/users/gkellogg/gists{/gist_id}","starred_url":"https://api.github.com/users/gkellogg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkellogg/subscriptions","organizations_url":"https://api.github.com/users/gkellogg/orgs","repos_url":"https://api.github.com/users/gkellogg/repos","events_url":"https://api.github.com/users/gkellogg/events{/privacy}","received_events_url":"https://api.github.com/users/gkellogg/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":0,"state":"open","created_at":"2015-05-13T16:31:01Z","updated_at":"2015-05-13T17:13:00Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-05-13T16:59:58Z","updated_at":"2015-05-13T22:53:08Z","closed_at":null,"body":"@bendiken said:\r\n\r\n> Also, in 2.0 we could take a page from Ruby 2.0's new conventions that\r\n> clarify which kinds of methods (e.g. String#chars) return arrays\r\n> versus return enumerators. These were pretty vague back in the day\r\n> when enumerators were brand spanking new, and our original interfaces\r\n> were defined accordingly, so we could bring them in line with language\r\n> conventions--probably no major changes needed."},"comment":{"url":"https://api.github.com/repos/ruby-rdf/rdf/issues/comments/101841146","html_url":"https://github.com/ruby-rdf/rdf/issues/192#issuecomment-101841146","issue_url":"https://api.github.com/repos/ruby-rdf/rdf/issues/192","id":101841146,"user":{"login":"gkellogg","id":46296,"avatar_url":"https://avatars.githubusercontent.com/u/46296?v=3","gravatar_id":"","url":"https://api.github.com/users/gkellogg","html_url":"https://github.com/gkellogg","followers_url":"https://api.github.com/users/gkellogg/followers","following_url":"https://api.github.com/users/gkellogg/following{/other_user}","gists_url":"https://api.github.com/users/gkellogg/gists{/gist_id}","starred_url":"https://api.github.com/users/gkellogg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkellogg/subscriptions","organizations_url":"https://api.github.com/users/gkellogg/orgs","repos_url":"https://api.github.com/users/gkellogg/repos","events_url":"https://api.github.com/users/gkellogg/events{/privacy}","received_events_url":"https://api.github.com/users/gkellogg/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T22:53:08Z","updated_at":"2015-05-13T22:53:08Z","body":"Yes, that's pretty much what we do now: we return either arrays, or yield to a block. In many cases, wrapping the result in `Queryable#enum_for` or `Enumerable#enum_for`; this is most useful at the outer-most layers, but could be useful as a multiplexed cursor when doing a distributed operation to a partitioned dataset, for example."}}